This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
*printf_r and reentrancy
- From: Eric Blake <ebb9 at byu dot net>
- To: newlib at sources dot redhat dot com
- Date: Tue, 13 Mar 2007 07:26:41 -0600
- Subject: *printf_r and reentrancy
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I noticed that various *printf_r routines all get bundled through
_vfprintf_r, which in turn calls __swsetup (via the macro cantwrite),
which in turn can call __smakebuf and _malloc_r(_REENT). But isn't this
design broken, if an alternate reentrancy object (rather than _REENT) was
originally passed to the *printf_r routine? In other words, should
cantwrite, __swsetup, and __smakebuf all be converted to pass a reentrancy
argument around?
- --
Don't work too hard, make some time for fun as well!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFF9qYs84KuGfSFAYARAtAXAJ9NkTshjAgRmCXo5eP7ao1t+LSQPQCfd0My
o2doW3smltifEQ9AbAcHeh4=
=ELRa
-----END PGP SIGNATURE-----