mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-03-01 20:45:37 +08:00
* newlib/libc/stdio/findfp.c (glue_with_file): New.
(__sfmoreglue): Use glue_with_file to avoid alignment problems.
This commit is contained in:
parent
ba42414160
commit
01aff1ea37
@ -1,3 +1,8 @@
|
|||||||
|
2013-03-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||||
|
|
||||||
|
* newlib/libc/stdio/findfp.c (glue_with_file): New.
|
||||||
|
(__sfmoreglue): Use glue_with_file to avoid alignment problems.
|
||||||
|
|
||||||
2013-02-28 Corinna Vinschen <vinschen@redhat.com>
|
2013-02-28 Corinna Vinschen <vinschen@redhat.com>
|
||||||
|
|
||||||
* libc/include/machine/setjmp.h (sigjmp_buf): Fix definition of
|
* libc/include/machine/setjmp.h (sigjmp_buf): Fix definition of
|
||||||
|
@ -77,23 +77,27 @@ _DEFUN(std, (ptr, flags, file, data),
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct glue_with_file {
|
||||||
|
struct _glue glue;
|
||||||
|
FILE file;
|
||||||
|
};
|
||||||
|
|
||||||
struct _glue *
|
struct _glue *
|
||||||
_DEFUN(__sfmoreglue, (d, n),
|
_DEFUN(__sfmoreglue, (d, n),
|
||||||
struct _reent *d _AND
|
struct _reent *d _AND
|
||||||
register int n)
|
register int n)
|
||||||
{
|
{
|
||||||
struct _glue *g;
|
struct glue_with_file *g;
|
||||||
FILE *p;
|
|
||||||
|
|
||||||
g = (struct _glue *) _malloc_r (d, sizeof (*g) + n * sizeof (FILE));
|
g = (struct glue_with_file *)
|
||||||
|
_malloc_r (d, sizeof (*g) + (n - 1) * sizeof (FILE));
|
||||||
if (g == NULL)
|
if (g == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
p = (FILE *) (g + 1);
|
g->glue._next = NULL;
|
||||||
g->_next = NULL;
|
g->glue._niobs = n;
|
||||||
g->_niobs = n;
|
g->glue._iobs = &g->file;
|
||||||
g->_iobs = p;
|
memset (&g->file, 0, n * sizeof (FILE));
|
||||||
memset (p, 0, n * sizeof (FILE));
|
return &g->glue;
|
||||||
return g;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user