This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: 3.4/3.5 PATCH: Fix Solaris 10 libjava bootstrap failure
Andrew Haley writes:
> Rainer Orth writes:
> >
> > Only signal.h.
>
> But who includes that? In Linux it seems to be included by pthread.h,
> which comes via java-thread.h. It seems likely that you'll end up
> including signal.h by accident.
-H reveals:
[...]
.. ./include/java-threads.h
... /usr/include/pthread.h
.... /usr/include/sys/feature_tests.h
..... /usr/include/sys/isa_defs.h
.... /vol/gcc/obj/gcc-3.4.0-20040318/10-gcc/gcc/include/sys/types.h
..... /usr/include/sys/machtypes.h
...... /usr/include/ia32/sys/machtypes.h
..... /usr/include/sys/int_types.h
..... /usr/include/sys/select.h
...... /vol/gcc/obj/gcc-3.4.0-20040318/10-gcc/gcc/include/sys/signal.h
[...]
I.e. <pthread.h> includes <sys/types.h>, which again includes
<sys/select.h> with this comment:
#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
[...]
/*
* Nested include for BSD/sockets source compatibility.
* (The select macros used to be defined here).
*/
#include <sys/select.h>
The latter includes <sys/signal.h> like so:
#if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__)
#include <sys/signal.h>
#include <sys/time_impl.h>
#endif
As you can see, defining __EXTENSIONS__ is the source of all evil. It
might be useful to try and get rid of this, but I fear this opens several
cans of worms ;-(
Rainer
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University