This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/11953] _REENTRANT defined when compiling non-threaded code.
- From: "carlo at alinoe dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Aug 2003 02:56:19 -0000
- Subject: [Bug other/11953] _REENTRANT defined when compiling non-threaded code.
- References: <20030817022106.11953.carlo@alinoe.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11953
------- Additional Comments From carlo at alinoe dot com 2003-08-17 02:56 -------
Subject: Re: _REENTRANT defined when compiling non-threaded code.
On Sun, Aug 17, 2003 at 02:37:18AM -0000, pinskia at gcc dot gnu dot org wrote:
> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11953
>
>
> pinskia at gcc dot gnu dot org changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> Status|NEW |RESOLVED
> Component|libstdc++ |other
> Resolution| |INVALID
>
>
> ------- Additional Comments From pinskia at gcc dot gnu dot org 2003-08-17 02:37 -------
> This was done on purpose:
> +/* Some implementations of <pthread.h> require this to be defined. */
> +#ifndef _REENTRANT
> +#define _REENTRANT 1
> +#endif
> +
Yes, so?
How is a developer supposed to know when an application is
compiled with threading now?
My code is FULL of
#ifdef _REENTRANT
...
#else
...
#endif
Suddenly all code that is compiled with the intension
to be not thread-safe, and which will not be linked
with libpthread.so is suddenly compiled as if it
has to be thread-safe?
Why was this done on purpose? It breaks a lot of code!