* 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
* Re: Is -D_XOPEN_SOURCE=500 necessary in gcc/config/sparc/sol2.h?
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
0 siblings, 1 reply; 4+ messages in thread
From: Alexandre Oliva @ 2001-07-10 11:45 UTC (permalink / raw)
To: Gerhard Franke; +Cc: gcc-help
On Jul 10, 2001, Gerhard Franke <Gerhard.Franke@mni.fh-giessen.de> wrote:
> Can I safely remove the -D_XOPEN_SOURCE=500 or replace it with some
> other less offensive defines?
I'm afraid this would render libstdc++-v3 useless.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is -D_XOPEN_SOURCE=500 necessary in gcc/config/sparc/sol2.h?
2001-07-10 11:45 ` Alexandre Oliva
@ 2001-07-11 4:46 ` Gerhard Franke
2001-07-11 9:28 ` Alexandre Oliva
0 siblings, 1 reply; 4+ messages in thread
From: Gerhard Franke @ 2001-07-11 4:46 UTC (permalink / raw)
To: gcc-help
On Tue, Jul 10, 2001 at 03:45:12PM -0300, Alexandre Oliva wrote:
> On Jul 10, 2001, Gerhard Franke <Gerhard.Franke@mni.fh-giessen.de> wrote:
> > Can I safely remove the -D_XOPEN_SOURCE=500 or replace it with some
> > other less offensive defines?
> I'm afraid this would render libstdc++-v3 useless.
Why this?
I just recompiled gcc-3.0 without -D_XOPEN_SOURCE=500 and now it
seems that everything is working...
Why doesn't g++ let the "application writer" decide wether to
define _XOPEN_SOURCE=500 or not?
from sys/feature-tests.h:
* application writers wishing to utilize UNIX 98 functionality
* must define _XOPEN_SOURCE=500. This turns on UNIX 95 functionality
* which is a subset of UNIX 98, and also turns on POSIX Realtime and
* POSIX Threads functionality.
Gerhard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is -D_XOPEN_SOURCE=500 necessary in gcc/config/sparc/sol2.h?
2001-07-11 4:46 ` Gerhard Franke
@ 2001-07-11 9:28 ` Alexandre Oliva
0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2001-07-11 9:28 UTC (permalink / raw)
To: Gerhard Franke; +Cc: gcc-help
On Jul 11, 2001, Gerhard Franke <Gerhard.Franke@mni.fh-giessen.de> wrote:
> On Tue, Jul 10, 2001 at 03:45:12PM -0300, Alexandre Oliva wrote:
>> On Jul 10, 2001, Gerhard Franke <Gerhard.Franke@mni.fh-giessen.de> wrote:
>> > Can I safely remove the -D_XOPEN_SOURCE=500 or replace it with some
>> > other less offensive defines?
>> I'm afraid this would render libstdc++-v3 useless.
> Why this?
It's a known problem in libstdc++-v3. Currently, it depends on
features and declarations that are only present with this define, on a
number of platforms. It's in the wishlist to remove this dependence,
but it couldn't be done in time for GCC 3.0.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ 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).