Bugzilla bug 265501: compilers do not define _LP64 implicitly. _LP64 is
authorwchang0222%aol.com
Tue, 26 Oct 2004 21:24:34 +0000
changeset 3205 cee4a32b910bf48ecd74f249f40f9970f50a260d
parent 3203 7078ef96ed05be63ef1550a639a425b85ac9e30c
child 3208 499a46768815848fa3ca08c5d1ab02565c29eee7
push idunknown
push userunknown
push dateunknown
bugs265501
Bugzilla bug 265501: compilers do not define _LP64 implicitly. _LP64 is defined by <sys/isa_defs.h>. So we need to test for the processor macros directly.
pr/include/md/_solaris.cfg
--- a/pr/include/md/_solaris.cfg
+++ b/pr/include/md/_solaris.cfg
@@ -43,32 +43,40 @@
 #endif
 
 #ifndef SOLARIS
 #define SOLARIS
 #endif
 
 #define PR_AF_INET6 26  /* same as AF_INET6 */
 
-#ifdef _LP64
-
 #if defined(sparc) || defined(__sparc)
 #undef  IS_LITTLE_ENDIAN
 #define IS_BIG_ENDIAN 1
 #define PR_ALIGN_OF_INT64   8
 #define PR_ALIGN_OF_DOUBLE  8
+#if defined(__sparcv9)
+#define IS_64
+#endif
 #elif defined(__x86_64)
 #define IS_LITTLE_ENDIAN 1
 #undef  IS_BIG_ENDIAN
 #define PR_ALIGN_OF_INT64   8
 #define PR_ALIGN_OF_DOUBLE  8
+#define IS_64
+#elif defined(i386) || defined(__i386)
+#define IS_LITTLE_ENDIAN 1
+#undef  IS_BIG_ENDIAN
+#define PR_ALIGN_OF_INT64   4
+#define PR_ALIGN_OF_DOUBLE  4
 #else
 #error unknown processor
 #endif
-#define IS_64
+
+#ifdef IS_64
 
 #define PR_BYTES_PER_BYTE   1
 #define PR_BYTES_PER_SHORT  2
 #define PR_BYTES_PER_INT    4
 #define PR_BYTES_PER_INT64  8
 #define PR_BYTES_PER_LONG   8
 #define PR_BYTES_PER_FLOAT  4
 #define PR_BYTES_PER_DOUBLE 8
@@ -96,31 +104,17 @@
 #define PR_BITS_PER_WORD_LOG2   6
 
 #define PR_ALIGN_OF_SHORT   2
 #define PR_ALIGN_OF_INT     4
 #define PR_ALIGN_OF_LONG    8
 #define PR_ALIGN_OF_FLOAT   4
 #define PR_ALIGN_OF_POINTER 8
 
-#else /* _LP64 */
-
-#if defined(sparc) || defined(__sparc)
-#undef  IS_LITTLE_ENDIAN
-#define IS_BIG_ENDIAN 1
-#define PR_ALIGN_OF_INT64   8
-#define PR_ALIGN_OF_DOUBLE  8
-#elif defined(i386) || defined(__i386)
-#define IS_LITTLE_ENDIAN 1
-#undef  IS_BIG_ENDIAN
-#define PR_ALIGN_OF_INT64   4
-#define PR_ALIGN_OF_DOUBLE  4
-#else
-#error unknown processor
-#endif
+#else /* IS_64 */
 
 #define PR_BYTES_PER_BYTE   1
 #define PR_BYTES_PER_SHORT  2
 #define PR_BYTES_PER_INT    4
 #define PR_BYTES_PER_INT64  8
 #define PR_BYTES_PER_LONG   4
 #define PR_BYTES_PER_FLOAT  4
 #define PR_BYTES_PER_DOUBLE 8
@@ -148,17 +142,17 @@
 #define PR_BITS_PER_WORD_LOG2   5
 
 #define PR_ALIGN_OF_SHORT   2
 #define PR_ALIGN_OF_INT     4
 #define PR_ALIGN_OF_LONG    4
 #define PR_ALIGN_OF_FLOAT   4
 #define PR_ALIGN_OF_POINTER 4
 
-#endif /* _LP64 */
+#endif /* IS_64 */
 
 #define	HAVE_LONG_LONG
 #define	HAVE_ALIGNED_DOUBLES
 #define	HAVE_ALIGNED_LONGLONGS
 
 #ifndef NO_NSPR_10_SUPPORT
 
 #define BYTES_PER_BYTE		PR_BYTES_PER_BYTE