summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/include
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2012-06-24 04:15:58 +0000
committerandrew <andrew@FreeBSD.org>2012-06-24 04:15:58 +0000
commit0a7002aae7e61d6d39fe1f0321e5c165246d87e3 (patch)
treee552f71c40d544605624d7aef2aa2206548a6f01 /sys/powerpc/include
parent2d5bdc7fffd9e35e7cecb5d639ce503ef8c73fef (diff)
downloadFreeBSD-src-0a7002aae7e61d6d39fe1f0321e5c165246d87e3.zip
FreeBSD-src-0a7002aae7e61d6d39fe1f0321e5c165246d87e3.tar.gz
Make the wchar_t type machine dependent.
This is required for ARM EABI. Section 7.1.1 of the Procedure Call for the ARM Architecture (AAPCS) defines wchar_t as either an unsigned int or an unsigned short with the former preferred. Because of this requirement we need to move the definition of __wchar_t to a machine dependent header. It also cleans up the macros defining the limits of wchar_t by defining __WCHAR_MIN and __WCHAR_MAX in the same machine dependent header then using them to define WCHAR_MIN and WCHAR_MAX respectively. Discussed with: bde
Diffstat (limited to 'sys/powerpc/include')
-rw-r--r--sys/powerpc/include/_stdint.h6
-rw-r--r--sys/powerpc/include/_types.h4
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/powerpc/include/_stdint.h b/sys/powerpc/include/_stdint.h
index a014ac6..6ad1fd2 100644
--- a/sys/powerpc/include/_stdint.h
+++ b/sys/powerpc/include/_stdint.h
@@ -189,12 +189,6 @@
#define SIZE_MAX UINT32_MAX
#endif
-#ifndef WCHAR_MIN /* Also possibly defined in <wchar.h> */
-/* Limits of wchar_t. */
-#define WCHAR_MIN INT32_MIN
-#define WCHAR_MAX INT32_MAX
-#endif
-
/* Limits of wint_t. */
#define WINT_MIN INT32_MIN
#define WINT_MAX INT32_MAX
diff --git a/sys/powerpc/include/_types.h b/sys/powerpc/include/_types.h
index 8c09ae7..55ec061 100644
--- a/sys/powerpc/include/_types.h
+++ b/sys/powerpc/include/_types.h
@@ -133,6 +133,10 @@ typedef __uint32_t __vm_size_t;
#endif
typedef __int64_t __vm_ooffset_t;
typedef __uint64_t __vm_pindex_t;
+typedef int __wchar_t;
+
+#define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */
+#define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */
/*
* Unusual type definitions.
OpenPOWER on IntegriCloud