This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: gtk-peer compile fixes for gcc-2.95
- From: Archie Cobbs <archie at dellroad dot org>
- To: Mark Wielaard <mark at klomp dot org>
- Cc: tromey at redhat dot com, commit-classpath at gnu dot org, java-patches at gcc dot gnu dot org
- Date: Fri, 9 Apr 2004 09:53:36 -0500 (CDT)
- Subject: Re: gtk-peer compile fixes for gcc-2.95
Mark Wielaard wrote:
> OK I tested some more and here is what I came up with:
> -ansi -std=c89 -pedantic -Wall -Wno-long-long -D_POSIX_SOURCE
> -D_BSD_SOURCE
> This gives us ISO C90 pedantic ansi, but with longlong (jlong) support
> and modern POSIX and BSD C library functions/prototypes (we actually
> need fsync and ftruncate for example which aren't in ISO C 90 so the
> glibc headers wouldn't define it with the above two defines).
Haven't tried this patch but am suspicious of it.
_BSD_SOURCE is a Linux-ism and means nothing on FreeBSD. However,
_POSIX_SOURCE on FreeBSD (as it should) will have the effect of
removing all non-POSIX declarations from the #include'd namespace.
Surely Classpath uses some non-POSIX functions (otherwise why would
_BSD_SOURCE be required on Linux?), so hopes are dim on this working.
I'd prefer to not have Linux specific code in Classpath if we can
help it (the biggest offender is that Classpath won't even build
unless "make" is really "gmake").
-Archie
__________________________________________________________________________
Archie Cobbs * CTO, Awarix * http://www.awarix.com