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: "bkoz at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Sep 2003 12:55:20 -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 bkoz at gcc dot gnu dot org 2003-09-10 12:55 -------
Carlo.
I'm not going to comment on this issue directly, but instead will tell you that
I've just learned that g++ doesn't define _REENTRANT on s390x and ia64 when
--enable-threads=posix and using -pthread on the command line. (Found while
compiling boost threads package on the afflicted platforms.) Supposdely this is
a known issues.
Thus, people who are using _REENTRANT as a macro to see if thread-enabled are
already going to have problems. The suggestion, made elsewhere, is to use
_POSIX_THREADS and check >= 0 (see unistd.h).
Best,
benjamin