This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 3.4/3.5 PATCH: Fix Solaris 10 libjava bootstrap failure


Andrew Haley writes:

>  > > Try removing
>  > > 
>  > > #include <java-signal.h>
>  > > 
>  > > from interpret.cc.
>  > 
>  > ... which won't help for verify.cc.
> 
> which shouldn't include it either.

... and it doesn't.

>  > Besides, <sys/signal.h> is dragged in indirectly via
>  > <sys/select.h>, so this won't help.
> 
> Right.  Well, this is defintely a Solaris bug.  What you seem to be
> saying is that on Solaris any program that uses any stdio headers can
> not define a class member or a variable called PC.

Only signal.h.

> Well, okay: please put the undef at the top of the file, with an
> appropriate comment.

I'll commit the following once it has passed bootstrap/regtest.

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University


Thu Mar 18 14:48:55 2004  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* verify.cc: Undef PC.

Index: libjava/verify.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/verify.cc,v
retrieving revision 1.61
diff -u -p -r1.61 verify.cc
--- libjava/verify.cc	1 Feb 2004 20:05:02 -0000	1.61
+++ libjava/verify.cc	18 Mar 2004 17:12:22 -0000
@@ -19,6 +19,11 @@ details.  */
 #include <java-insns.h>
 #include <java-interp.h>
 
+// On Solaris 10/x86, <signal.h> indirectly includes <ia32/sys/reg.h>, which 
+// defines PC since g++ predefines __EXTENSIONS__.  Undef here to avoid clash
+// with PC member of class _Jv_BytecodeVerifier below.
+#undef PC
+
 #ifdef INTERPRETER
 
 #include <java/lang/Class.h>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]