This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH] Fix potential reent issue
- From: Federico Terraneo <fede dot tft at hotmail dot it>
- To: newlib at sourceware dot org
- Date: Mon, 24 Jun 2013 16:51:08 +0200
- Subject: Re: [PATCH] Fix potential reent issue
- References: <BLU0-SMTP2494D64FD9A74C0AB89A85FF9890 at phx dot gbl> <3862C5643B15B6468269546753EB2A9208B67D36 at BLTSXVS01 dot govsolutions dot com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 06/24/2013 04:10 PM, Howland Craig D (Craig) wrote:
>
> A #ifndef __getreent gating the __getreent() definition has been
> lost in the move. Do you have a reason for this? I don't
> specifically know why it is this way (perhaps Jeff does), but
> presumably it is to allow a mapping of some kind, as is done for
> some other things (e.g. HUGE_VAL in math.h). (Having the gate does
> seem a little odd, but it seems prudent to raise the question as to
> its purpose before removing it.)
It wasn't removed, it was just chained to the #if. Now, the 80 char
per line limit in the email does not help in making the code clear, but an
&& !defined(__getreent) was added to the #if.
#if defined(__DYNAMIC_REENT__) && !defined(__SINGLE_THREAD__) &&
!defined(__getreent)
struct _reent * _EXFUN(__getreent, (void));
#endif
By the way, if you tink this makes the code less clear I can provide a
patch that nests the #ifndef inside the #if as it was before.
>
> Craig
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJRyFzZAAoJECkLFtN5Xr9fOZAIANRgskL0Qa40qiITuktnrYOp
XO/UEONmNJ+cqdWlDNmowR3HskK+kAsU/1zj6Cskx8NHe20BsNH5fDTk+P5wGIuA
7rTfynVxHQrSeQUY5xjXjZe0W62xKaDnftdiHfpeOecAlNA7py61s/yK5iUBibUx
hcFtobwlkJEzpkjvncA/kIbXS5oTGoFe7bT4wkG6xYZ7GtqnplaGPkuwo7TqSsgf
k+xshMUwAQR3l7Wi6I6AV53IDWDg2slitO46dVS58vpGiuU7V16W3T30/TYTEVwQ
Fs6Qcc8SN+LthorTAXZiyV+yw7hQhiWXhS6u1DbyL4fStsUFYzGRRHS1M4zBXMA=
=17IZ
-----END PGP SIGNATURE-----