summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/include/_types.h
diff options
context:
space:
mode:
authortijl <tijl@FreeBSD.org>2011-01-08 12:43:05 +0000
committertijl <tijl@FreeBSD.org>2011-01-08 12:43:05 +0000
commit89281909e199aee2c6c9da6a30e4c5d4a131fced (patch)
tree982d82f606fd515f513b96a4ec7aea4727588d31 /sys/powerpc/include/_types.h
parent61d89c0b21ee8ee88c291bd781b885c9ff0d6245 (diff)
downloadFreeBSD-src-89281909e199aee2c6c9da6a30e4c5d4a131fced.zip
FreeBSD-src-89281909e199aee2c6c9da6a30e4c5d4a131fced.tar.gz
On mixed 32/64 bit architectures (mips, powerpc) use __LP64__ rather than
architecture macros (__mips_n64, __powerpc64__) when 64 bit types (and corresponding macros) are different from 32 bit. [1] Correct the type of INT64_MIN, INT64_MAX and UINT64_MAX. Define (U)INTMAX_C as an alias for (U)INT64_C matching the type definition for (u)intmax_t. Do this on all architectures for consistency. Suggested by: bde [1] Approved by: kib (mentor)
Diffstat (limited to 'sys/powerpc/include/_types.h')
-rw-r--r--sys/powerpc/include/_types.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/powerpc/include/_types.h b/sys/powerpc/include/_types.h
index a6e393e..fae2416 100644
--- a/sys/powerpc/include/_types.h
+++ b/sys/powerpc/include/_types.h
@@ -52,7 +52,7 @@ typedef short __int16_t;
typedef unsigned short __uint16_t;
typedef int __int32_t;
typedef unsigned int __uint32_t;
-#ifdef __powerpc64__
+#ifdef __LP64__
typedef long __int64_t;
typedef unsigned long __uint64_t;
#else
@@ -75,7 +75,7 @@ typedef __uint32_t __clock_t; /* clock()... */
typedef unsigned int __cpumask_t;
typedef double __double_t;
typedef double __float_t;
-#ifdef __powerpc64__
+#ifdef __LP64__
typedef __int64_t __critical_t;
typedef __int64_t __intfptr_t;
typedef __int64_t __intptr_t;
@@ -93,7 +93,7 @@ typedef __int8_t __int_least8_t;
typedef __int16_t __int_least16_t;
typedef __int32_t __int_least32_t;
typedef __int64_t __int_least64_t;
-#ifdef __powerpc64__
+#ifdef __LP64__
typedef __int64_t __ptrdiff_t; /* ptr1 - ptr2 */
typedef __int64_t __register_t;
typedef __int64_t __segsz_t; /* segment size (in pages) */
@@ -121,7 +121,7 @@ typedef __uint8_t __uint_least8_t;
typedef __uint16_t __uint_least16_t;
typedef __uint32_t __uint_least32_t;
typedef __uint64_t __uint_least64_t;
-#ifdef __powerpc64__
+#ifdef __LP64__
typedef __uint64_t __u_register_t;
typedef __uint64_t __vm_offset_t;
typedef __uint64_t __vm_paddr_t;
OpenPOWER on IntegriCloud