diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2010-07-13 05:32:19 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2010-07-13 05:32:19 +0000 |
commit | 2127edd2e4b37d0e5b88e5d8eed4f87e927f83da (patch) | |
tree | 735db4c7a37fa272b6302d00e5a8c7e4c1bf84cb /sys/powerpc/include/_limits.h | |
parent | 0ac6bad14a01affb256183801472e3a26ef32a4e (diff) | |
download | FreeBSD-src-2127edd2e4b37d0e5b88e5d8eed4f87e927f83da.zip FreeBSD-src-2127edd2e4b37d0e5b88e5d8eed4f87e927f83da.tar.gz |
MFppc64:
Kernel sources for 64-bit PowerPC, along with build-system changes to keep
32-bit kernels compiling (build system changes for 64-bit kernels are
coming later). Existing 32-bit PowerPC kernel configurations must be
updated after this change to specify their architecture.
Diffstat (limited to 'sys/powerpc/include/_limits.h')
-rw-r--r-- | sys/powerpc/include/_limits.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/powerpc/include/_limits.h b/sys/powerpc/include/_limits.h index 76e73544..015a9f7 100644 --- a/sys/powerpc/include/_limits.h +++ b/sys/powerpc/include/_limits.h @@ -59,8 +59,7 @@ #define __INT_MAX 0x7fffffff /* max value for an int */ #define __INT_MIN (-0x7fffffff - 1) /* min value for an int */ -/* Bad hack for gcc configured to give 64-bit longs. */ -#ifdef _LARGE_LONG +#if defined(_LARGE_LONG) || defined(__LP64__) #define __ULONG_MAX 0xffffffffffffffffUL #define __LONG_MAX 0x7fffffffffffffffL #define __LONG_MIN (-0x7fffffffffffffffL - 1) @@ -74,9 +73,13 @@ #define __LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */ #define __LLONG_MIN (-0x7fffffffffffffffLL - 1) /* min for a long long */ +#ifdef __powerpc64__ +#define __SSIZE_MAX __LONG_MAX /* max value for a ssize_t */ +#define __SIZE_T_MAX __ULONG_MAX /* max value for a size_t */ +#else #define __SSIZE_MAX __INT_MAX /* max value for a ssize_t */ - #define __SIZE_T_MAX __UINT_MAX /* max value for a size_t */ +#endif #define __OFF_MAX __LLONG_MAX /* max value for an off_t */ #define __OFF_MIN __LLONG_MIN /* min value for an off_t */ @@ -86,7 +89,7 @@ #define __QUAD_MAX __LLONG_MAX /* max value for a quad_t */ #define __QUAD_MIN __LLONG_MIN /* min value for a quad_t */ -#ifdef _LARGE_LONG +#if defined(_LARGE_LONG) || defined(__LP64__) #define __LONG_BIT 64 #else #define __LONG_BIT 32 |