2004-01-30 Thomas Pfaff <tpfaff@gmx.net>

Jeff Johnston  <jjohnstn@redhat.com>

        * libc/stdio/fwalk.c (_fwalk): Traverse the given reentrancy
        struct for std streams and traverse the global reeentrancy
        struct for all other streams.
This commit is contained in:
Jeff Johnston 2004-01-30 20:32:04 +00:00
parent 1a4f1aef1f
commit ff41498a19
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2004-01-30 Thomas Pfaff <tpfaff@gmx.net>
Jeff Johnston <jjohnstn@redhat.com>
* libc/stdio/fwalk.c (_fwalk): Traverse the given reentrancy
struct for std streams and traverse the global reeentrancy
struct for all other streams.
2004-01-27 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdlib/atexit.c: Protect global atexit list with a

View File

@ -35,9 +35,17 @@ _fwalk (ptr, function)
register int n, ret = 0;
register struct _glue *g;
/* Must traverse given list for std streams. */
for (g = &ptr->__sglue; g != NULL; g = g->_next)
for (fp = g->_iobs, n = g->_niobs; --n >= 0; fp++)
if (fp->_flags != 0)
ret |= (*function) (fp);
/* Must traverse global list for all other streams. */
for (g = &_GLOBAL_REENT->__sglue; g != NULL; g = g->_next)
for (fp = g->_iobs, n = g->_niobs; --n >= 0; fp++)
if (fp->_flags != 0)
ret |= (*function) (fp);
return ret;
}