svn commit: r195869 - projects/ppc64/sys/powerpc/include
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Sat Jul 25 14:33:22 UTC 2009
Author: nwhitehorn
Date: Sat Jul 25 14:33:21 2009
New Revision: 195869
URL: http://svn.freebsd.org/changeset/base/195869
Log:
Add some #ifdefs to powerpc _types to set LP64 types if we are compiling
for 64-bit PowerPC. The goal here is to share machine/*.h completely
between powerpc and powerpc64.
Modified:
projects/ppc64/sys/powerpc/include/_types.h
Modified: projects/ppc64/sys/powerpc/include/_types.h
==============================================================================
--- projects/ppc64/sys/powerpc/include/_types.h Sat Jul 25 14:31:24 2009 (r195868)
+++ projects/ppc64/sys/powerpc/include/_types.h Sat Jul 25 14:33:21 2009 (r195869)
@@ -53,6 +53,13 @@ typedef unsigned short __uint16_t;
typedef int __int32_t;
typedef unsigned int __uint32_t;
+#ifdef __powerpc64__
+
+typedef long __int64_t;
+typedef unsigned long __uint64_t;
+
+#else
+
#if defined(lint)
/* LONGLONG */
typedef long long __int64_t;
@@ -68,17 +75,25 @@ typedef long long __int64_t;
typedef unsigned long long __uint64_t;
#endif
+#endif
+
/*
* Standard type definitions.
*/
typedef __uint32_t __clock_t; /* clock()... */
typedef unsigned int __cpumask_t;
-typedef __int32_t __critical_t;
typedef double __double_t;
typedef double __float_t;
+#ifdef __powerpc64__
+typedef __int64_t __critical_t;
+typedef __int64_t __intfptr_t;
+typedef __int64_t __intptr_t;
+#else
+typedef __int32_t __critical_t;
typedef __int32_t __intfptr_t;
-typedef __int64_t __intmax_t;
typedef __int32_t __intptr_t;
+#endif
+typedef __int64_t __intmax_t;
typedef __int32_t __int_fast8_t;
typedef __int32_t __int_fast16_t;
typedef __int32_t __int_fast32_t;
@@ -87,6 +102,17 @@ 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__
+typedef __int64_t __ptrdiff_t; /* ptr1 - ptr2 */
+typedef __int64_t __register_t;
+typedef __int64_t __segsz_t; /* segment size (in pages) */
+typedef __uint64_t __size_t; /* sizeof() */
+typedef __int64_t __ssize_t; /* byte count or error */
+typedef __int64_t __time_t; /* time()... */
+typedef __uint64_t __uintfptr_t;
+typedef __uint64_t __uintptr_t;
+#else
+typedef __uint64_t __uintmax_t;
typedef __int32_t __ptrdiff_t; /* ptr1 - ptr2 */
typedef __int32_t __register_t;
typedef __int32_t __segsz_t; /* segment size (in pages) */
@@ -94,8 +120,9 @@ typedef __uint32_t __size_t; /* sizeof(
typedef __int32_t __ssize_t; /* byte count or error */
typedef __int32_t __time_t; /* time()... */
typedef __uint32_t __uintfptr_t;
-typedef __uint64_t __uintmax_t;
typedef __uint32_t __uintptr_t;
+#endif
+typedef __uint64_t __uintmax_t;
typedef __uint32_t __uint_fast8_t;
typedef __uint32_t __uint_fast16_t;
typedef __uint32_t __uint_fast32_t;
@@ -104,12 +131,19 @@ 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__
+typedef __uint64_t __u_register_t;
+typedef __uint64_t __vm_offset_t;
+typedef __uint64_t __vm_paddr_t;
+typedef __uint64_t __vm_size_t;
+#else
typedef __uint32_t __u_register_t;
typedef __uint32_t __vm_offset_t;
-typedef __int64_t __vm_ooffset_t;
typedef __uint32_t __vm_paddr_t;
-typedef __uint64_t __vm_pindex_t;
typedef __uint32_t __vm_size_t;
+#endif
+typedef __int64_t __vm_ooffset_t;
+typedef __uint64_t __vm_pindex_t;
/*
* Unusual type definitions.
More information about the svn-src-projects
mailing list