[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gtk-peer compile fixes for gcc-2.95

From: Archie Cobbs
Subject: Re: gtk-peer compile fixes for gcc-2.95
Date: Fri, 9 Apr 2004 10:48:19 -0500 (CDT)

Mark Wielaard wrote:
> > On Fri, 2004-04-09 at 16:53, Archie Cobbs wrote:
> > > Surely Classpath uses some non-POSIX functions (otherwise why would
> > > _BSD_SOURCE be required on Linux?), so hopes are dim on this working.
> >
> > Thanks for the info, I came up with the above settings by trial and
> > error. I hope they are as strict as needeed. There should indeed not be
> > any non-POSIX-isms in the current source except when the build can
> > detect that it is save to use in the build environment (that is why we
> > use the autotools).
> Just to make this more clear. Under ISO C 90 some newer C library
> functions aren't available, so glibc correctly hides them. That is why
> we need the _BSD_SOURCE defined on GNU systems when compiling with
> -std=c89. It will define those newer ISO C/Posix functions that came
> from old BSD and GNU systems and are always available there. If there is
> another flag for use with BSD systems that enable these function
> declarations under strict ISO C 90 rules we must add that to the

I'm not an expert on this stuff so my apologies if I'm confused...

First of all, it seems like -std=c89 specifies the variant of the
C language that the compiler expects, whereas _BSD_SOURCE and
_POSIX_SOURCE affect what declarations (and #define's) are included
in the namespace visible to the compiler from #include files.

So these two things seem to be orthogonal, so I don't understand what
you mean by "we need the _BSD_SOURCE defined on GNU systems when compiling
with -std=c89".

On the other hand, it would make sense if you said: "we need the _BSD_SOURCE
defined on GNU systems when compiling with _POSIX_SOURCE".

Now, back to my other question: why not just get rid of _POSIX_SOURCE?
That seems to solve the problem in all cases (unless I'm confused, which
is probably the case :-)


Archie Cobbs      *        CTO, Awarix        *

reply via email to

[Prev in Thread] Current Thread [Next in Thread]