public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/17398] New: _REENTRANT is getting defined.
@ 2004-09-10 15:09 william dot crocker at analog dot com
2004-09-10 15:25 ` [Bug preprocessor/17398] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: william dot crocker at analog dot com @ 2004-09-10 15:09 UTC (permalink / raw)
To: gcc-bugs
GCC Team:
Version of GCC: 3.4.2
System type: Linux juno 2.4.20-20.8 #1 Mon Aug 18 14:59:07 EDT 2003 i686 i686
i386 GNU/Linux
Build options: [whc@juno gcc]$ usr_local_3.4.2/bin/g++ -v
Reading specs from
/home/whc/lintel/gcc/usr_local_3.4.2/lib/gcc/i686-pc-linux-gnu/3.4.2/specs
Configured with: ./configure : (reconfigured) ./configure
--prefix=/home/whc/lintel/gcc/usr_local_3.4.2
Thread model: posix
gcc version 3.4.2
I tried to compile my non-threaded application.
(I have some experimental thread code which is IFDEFed
out using #ifdef _REENTRANT).
It be came apparent that this code was being
seen by the compiler implying that someone, somewhere
was defining _REENTRANT.
The following program demonstrated that fact.
(Yes, I know I should include iostream
instead of iostream.h but I still have a couple of ports
to compilers which do not support the standard yet and until
iostream.h disappears completely it should work.)
-----------------------------
#include <iostream.h>
int
main() {
# ifdef _REENTRANT
cerr << "_REENTRANT is defined" << endl;
# else
cerr << "_REENTRANT is NOT defined" << endl;
# endif
return 1;
}
------------- Building and running
[whc@juno usl_t]$ make z.o
/home/whc/lintel/gcc/usr_local_3.4.2/bin/g++ -c -O3 -ffast-math -I. -DNDEBUG
-DLINTEL -DGCC_VER=2 -fwritable-strings -Wno-deprecated -fno-for-scope
-fcheck-new -Wno-invalid-offsetof -I../purify -I../compat -I../setpaths z.cc
cc1plus: note: -fwritable-strings is deprecated; see documentation for details
[whc@juno usl_t]$ make z
/home/whc/lintel/gcc/usr_local_3.4.2/bin/g++ z.o -o z
[whc@juno usl_t]$ ./z
_REENTRANT is defined
-----------------------------
I traced it to this file:
i686-pc-linux-gnu/bits/c++io.h
in which I commented out a couple of lines and
then _REENTRANT stopped being defined.
-------------------- My quick fix.
...
...
...
#include <cstdio>
#include <cstddef>
// #include <bits/gthr.h> <--- Commented out.
namespace std
{
// typedef __gthread_mutex_t __c_lock; <--- Commented out.
// for basic_file.h
typedef FILE __c_file;
...
...
...
--------------------
What the-right-thing-to-do-here is I will
leave up to you.
Bill
--
Summary: _REENTRANT is getting defined.
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: william dot crocker at analog dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17398
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug preprocessor/17398] _REENTRANT is getting defined.
2004-09-10 15:09 [Bug preprocessor/17398] New: _REENTRANT is getting defined william dot crocker at analog dot com
@ 2004-09-10 15:25 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-10 15:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-10 15:25 -------
*** This bug has been marked as a duplicate of 11953 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17398
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-09-10 15:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-10 15:09 [Bug preprocessor/17398] New: _REENTRANT is getting defined william dot crocker at analog dot com
2004-09-10 15:25 ` [Bug preprocessor/17398] " pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).