public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Is -D_XOPEN_SOURCE=500 necessary in gcc/config/sparc/sol2.h?
@ 2001-07-10  5:45 Gerhard Franke
  2001-07-10 11:45 ` Alexandre Oliva
  0 siblings, 1 reply; 4+ messages in thread
From: Gerhard Franke @ 2001-07-10  5:45 UTC (permalink / raw)
  To: gcc-help

Hello,

since I didn't get any answer to my mail "Compile problems with g++-3.0"
( http://gcc.gnu.org/ml/gcc-help/2001-07/msg00066.html ) from July 5th
I tried to figure out why g++-2.95.3 behaves differently to g++-3.0
in the handling of #include <sys/socket.h>.

In short:
gcc/config/sparc/sol2.h of gcc-3.0 defines CPLUSPLUS_CPP_SPEC to
-D_XOPEN_SOURCE=500 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 \
-D__EXTENSIONS__
while gcc-2.95.3 does not.

The -D_XOPEN_SOURCE=500 triggers the odd(?) behavior of g++ or the
C preprocessor described in my other mail by defining _XPG4_2 in
sys/feature_tests.h. This activates, for example, the
'#define connect __xnet_conect' line in sys/socket.h and from now on
the preprocessor replaces every occurrence of a connect string with
__xnet_connect.

Can I safely remove the -D_XOPEN_SOURCE=500 or replace it with some
other less offensive defines?


Gerhard

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-07-11  9:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-10  5:45 Is -D_XOPEN_SOURCE=500 necessary in gcc/config/sparc/sol2.h? Gerhard Franke
2001-07-10 11:45 ` Alexandre Oliva
2001-07-11  4:46   ` Gerhard Franke
2001-07-11  9:28     ` Alexandre Oliva

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).