This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/11953] _REENTRANT defined when compiling non-threaded code.


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!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]