This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
[PATCH] _fwalk walks through thread local FILE pointer
- From: Thomas Pfaff <tpfaff at gmx dot net>
- To: newlib at sources dot redhat dot com
- Date: Wed, 28 Jan 2004 20:16:59 +0100
- Subject: [PATCH] _fwalk walks through thread local FILE pointer
instead of global file pointer list.
Thomas
2004-01-28 Thomas Pfaff <tpfaff.gmx.net>
* libc/stdio/fwalk.c (_fwalk): Walk through global file
pointer list instead of thread lokal.
--- fwalk.c.org 2000-05-14 18:46:11.000000000 +0200
+++ fwalk.c 2004-01-28 10:01:03.646001600 +0100
@@ -35,7 +35,7 @@ _fwalk (ptr, function)
register int n, ret = 0;
register struct _glue *g;
- for (g = &ptr->__sglue; g != NULL; g = g->_next)
+ 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);