mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
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.
This commit is contained in:
parent
4841950f4d
commit
842593b76f
@ -48,22 +48,30 @@
|
||||
|
||||
#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
|
||||
@ -101,21 +109,7 @@
|
||||
#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
|
||||
@ -153,7 +147,7 @@
|
||||
#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
|
||||
|
Loading…
Reference in New Issue
Block a user