diff options
author | Andrew Turner <andrew@FreeBSD.org> | 2012-06-24 04:15:58 +0000 |
---|---|---|
committer | Andrew Turner <andrew@FreeBSD.org> | 2012-06-24 04:15:58 +0000 |
commit | 74dc547e24c143e53bdcfdc02a718cf09abbf0f2 (patch) | |
tree | e552f71c40d544605624d7aef2aa2206548a6f01 /sys/powerpc/include/_types.h | |
parent | f745b1635901f37c921bc27de9aa80a6edc4d5fb (diff) | |
download | src-74dc547e24c143e53bdcfdc02a718cf09abbf0f2.tar.gz src-74dc547e24c143e53bdcfdc02a718cf09abbf0f2.zip |
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
Notes
Notes:
svn path=/head/; revision=237517
Diffstat (limited to 'sys/powerpc/include/_types.h')
-rw-r--r-- | sys/powerpc/include/_types.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/powerpc/include/_types.h b/sys/powerpc/include/_types.h index 8c09ae741f53..55ec0617318a 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. |