]> sourceware.org Git - newlib-cygwin.git/commitdiff
2004-01-30 Thomas Pfaff <tpfaff@gmx.net>
authorJeff Johnston <jjohnstn@redhat.com>
Fri, 30 Jan 2004 20:32:04 +0000 (20:32 +0000)
committerJeff Johnston <jjohnstn@redhat.com>
Fri, 30 Jan 2004 20:32:04 +0000 (20:32 +0000)
            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.

newlib/ChangeLog
newlib/libc/stdio/fwalk.c

index 5757512f267b1fb5aaaaf9bdc44e1dec1508f4aa..7ea7d1550ec7a4fdeb6c73322de0fc837df587a4 100644 (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
index 5162834664349607bc3147f3fc2dc374b2cf10ca..4d37499dd9b1fe835d37c223fec5ba8948609bc2 100644 (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;
 }
This page took 0.051346 seconds and 5 git commands to generate.