mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-28 12:05:47 +08:00
* libc/stdio/findfp.c (__sinit): Avoid infinite recursion on
_REENT_SMALL targets. Add comment to explain.
This commit is contained in:
parent
cd69beda67
commit
8336af85e9
@ -1,3 +1,8 @@
|
|||||||
|
2012-06-05 Corinna Vinschen <vinschen@redhat.com>
|
||||||
|
|
||||||
|
* libc/stdio/findfp.c (__sinit): Avoid infinite recursion on
|
||||||
|
_REENT_SMALL targets. Add comment to explain.
|
||||||
|
|
||||||
2012-05-31 Corinna Vinschen <vinschen@redhat.com>
|
2012-05-31 Corinna Vinschen <vinschen@redhat.com>
|
||||||
|
|
||||||
* libc/stdio/local.h (_newlib_sfp_lock_exit): Fix typo in non-pthread
|
* libc/stdio/local.h (_newlib_sfp_lock_exit): Fix typo in non-pthread
|
||||||
|
@ -200,6 +200,11 @@ _DEFUN(__sinit, (s),
|
|||||||
#else
|
#else
|
||||||
s->__sglue._niobs = 0;
|
s->__sglue._niobs = 0;
|
||||||
s->__sglue._iobs = NULL;
|
s->__sglue._iobs = NULL;
|
||||||
|
/* Avoid infinite recursion when calling __sfp for _GLOBAL_REENT. The
|
||||||
|
problem is that __sfp checks for _GLOBAL_REENT->__sdidinit and calls
|
||||||
|
__sinit if it's 0. */
|
||||||
|
if (s == _GLOBAL_REENT)
|
||||||
|
s->__sdidinit = 1;
|
||||||
s->_stdin = __sfp(s);
|
s->_stdin = __sfp(s);
|
||||||
s->_stdout = __sfp(s);
|
s->_stdout = __sfp(s);
|
||||||
s->_stderr = __sfp(s);
|
s->_stderr = __sfp(s);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user