diff options
author | andrew <andrew@FreeBSD.org> | 2012-06-24 04:15:58 +0000 |
---|---|---|
committer | andrew <andrew@FreeBSD.org> | 2012-06-24 04:15:58 +0000 |
commit | 0a7002aae7e61d6d39fe1f0321e5c165246d87e3 (patch) | |
tree | e552f71c40d544605624d7aef2aa2206548a6f01 /include/wchar.h | |
parent | 2d5bdc7fffd9e35e7cecb5d639ce503ef8c73fef (diff) | |
download | FreeBSD-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 'include/wchar.h')
-rw-r--r-- | include/wchar.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/wchar.h b/include/wchar.h index 1ebb72f..9e8d807 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -88,10 +88,8 @@ typedef __wint_t wint_t; #define _WINT_T_DECLARED #endif -#ifndef WCHAR_MIN -#define WCHAR_MIN __INT_MIN -#define WCHAR_MAX __INT_MAX -#endif +#define WCHAR_MIN __WCHAR_MIN +#define WCHAR_MAX __WCHAR_MAX #ifndef WEOF #define WEOF ((wint_t)-1) |