Patch: Solaris 2.5, uint32_t, pthread.h
Tom Tromey
tromey@cygnus.com
Mon Jul 12 09:30:00 GMT 1999
On Solaris 2.5, pthread.h (which we include when using POSIX threads)
defines uint32_t. This causes a clash with mprec.h. Instead of
checking for this and adding a new configure define, I've opted to
protect our definition the same way that Solaris 2.5 does. This is a
hack, but not disgustingly so (IMO). I'm applying this patch to both
the trunk and the 2.95 branch.
1999-07-12 Tom Tromey <tromey@cygnus.com>
* java/lang/mprec.h: Protect definition of uint32_t with #ifndef
_UINT32_T.
Tom
Index: java/lang/mprec.h
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/lang/mprec.h,v
retrieving revision 1.1.1.1.2.1
diff -u -r1.1.1.1.2.1 mprec.h
--- mprec.h 1999/06/24 20:15:17 1.1.1.1.2.1
+++ mprec.h 1999/07/12 16:27:32
@@ -61,7 +61,13 @@
#if !defined HAVE_BSD_INT32_DEFINED && !defined HAVE_INT32_DEFINED
// FIXME -- this could have problems with systems that don't define SI to be 4
typedef int int32_t __attribute__((mode(SI)));
+
+/* This is a blatant hack: on Solaris 2.5, pthread.h defines uint32_t
+ in pthread.h, which we sometimes include. We protect our
+ definition the same way Solaris 2.5 does, to avoid redefining it. */
+# ifndef _UINT32_T
typedef unsigned int uint32_t __attribute__((mode(SI)));
+# endif
#endif
/* These typedefs are true for the targets running Java. */
More information about the Java-patches
mailing list