aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arm/include/_stdint.h6
-rw-r--r--sys/arm/include/_types.h10
-rw-r--r--sys/ia64/include/_stdint.h6
-rw-r--r--sys/ia64/include/_types.h4
-rw-r--r--sys/mips/include/_stdint.h6
-rw-r--r--sys/mips/include/_types.h4
-rw-r--r--sys/powerpc/include/_stdint.h6
-rw-r--r--sys/powerpc/include/_types.h4
-rw-r--r--sys/sparc64/include/_stdint.h6
-rw-r--r--sys/sparc64/include/_types.h4
-rw-r--r--sys/sys/_types.h9
-rw-r--r--sys/sys/stdint.h4
-rw-r--r--sys/x86/include/_stdint.h6
-rw-r--r--sys/x86/include/_types.h4
14 files changed, 38 insertions, 41 deletions
diff --git a/sys/arm/include/_stdint.h b/sys/arm/include/_stdint.h
index 2a4f75afb4e5..50861284d8bc 100644
--- a/sys/arm/include/_stdint.h
+++ b/sys/arm/include/_stdint.h
@@ -149,12 +149,6 @@
/* Limit of size_t. */
#define SIZE_MAX UINT32_MAX
-#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/arm/include/_types.h b/sys/arm/include/_types.h
index 338c19c11136..7915d0b7cafd 100644
--- a/sys/arm/include/_types.h
+++ b/sys/arm/include/_types.h
@@ -105,6 +105,16 @@ typedef __uint32_t __vm_paddr_t;
typedef __uint64_t __vm_pindex_t;
typedef __uint32_t __vm_size_t;
+#ifdef __ARM_EABI__
+typedef unsigned int __wchar_t;
+#define __WCHAR_MIN 0 /* min value for a wchar_t */
+#define __WCHAR_MAX __UINT_MAX /* max value for a wchar_t */
+#else
+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 */
+#endif
+
/*
* Unusual type definitions.
*/
diff --git a/sys/ia64/include/_stdint.h b/sys/ia64/include/_stdint.h
index e36c6598861b..cb3b1a230595 100644
--- a/sys/ia64/include/_stdint.h
+++ b/sys/ia64/include/_stdint.h
@@ -149,12 +149,6 @@
/* Limit of size_t. */
#define SIZE_MAX UINT64_MAX
-#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/ia64/include/_types.h b/sys/ia64/include/_types.h
index 66ac0ccb6c4b..2876648d6674 100644
--- a/sys/ia64/include/_types.h
+++ b/sys/ia64/include/_types.h
@@ -96,6 +96,10 @@ typedef __int64_t __vm_ooffset_t;
typedef __uint64_t __vm_paddr_t;
typedef __uint64_t __vm_pindex_t;
typedef __uint64_t __vm_size_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.
diff --git a/sys/mips/include/_stdint.h b/sys/mips/include/_stdint.h
index cf183733b224..510b8eae32c8 100644
--- a/sys/mips/include/_stdint.h
+++ b/sys/mips/include/_stdint.h
@@ -186,12 +186,6 @@
#define SIG_ATOMIC_MIN INT32_MIN
#define SIG_ATOMIC_MAX INT32_MAX
-#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/mips/include/_types.h b/sys/mips/include/_types.h
index a92f7fb2363d..ba0ee302aec2 100644
--- a/sys/mips/include/_types.h
+++ b/sys/mips/include/_types.h
@@ -145,6 +145,10 @@ typedef __uint32_t __vm_paddr_t;
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.
diff --git a/sys/powerpc/include/_stdint.h b/sys/powerpc/include/_stdint.h
index a014ac69f51e..6ad1fd257d43 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 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.
diff --git a/sys/sparc64/include/_stdint.h b/sys/sparc64/include/_stdint.h
index e36c6598861b..cb3b1a230595 100644
--- a/sys/sparc64/include/_stdint.h
+++ b/sys/sparc64/include/_stdint.h
@@ -149,12 +149,6 @@
/* Limit of size_t. */
#define SIZE_MAX UINT64_MAX
-#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/sparc64/include/_types.h b/sys/sparc64/include/_types.h
index 5899401ff29c..aa8a299a2f81 100644
--- a/sys/sparc64/include/_types.h
+++ b/sys/sparc64/include/_types.h
@@ -92,6 +92,10 @@ typedef __int64_t __vm_ooffset_t;
typedef __uint64_t __vm_paddr_t;
typedef __uint64_t __vm_pindex_t;
typedef __uint64_t __vm_size_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.
diff --git a/sys/sys/_types.h b/sys/sys/_types.h
index c59afd31cb55..27ecaf4f0e12 100644
--- a/sys/sys/_types.h
+++ b/sys/sys/_types.h
@@ -80,14 +80,13 @@ typedef int __cpusetid_t; /* cpuset identifier. */
* ANSI C), but they use __ct_rune_t instead of int.
*
* NOTE: rune_t is not covered by ANSI nor other standards, and should not
- * be instantiated outside of lib/libc/locale. Use wchar_t. wchar_t and
- * rune_t must be the same type. Also, wint_t must be no narrower than
- * wchar_t, and should be able to hold all members of the largest
- * character set plus one extra value (WEOF), and must be at least 16 bits.
+ * be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and
+ * rune_t must be the same type. Also, wint_t should be able to hold all
+ * members of the largest character set plus one extra value (WEOF), and
+ * must be at least 16 bits.
*/
typedef int __ct_rune_t; /* arg type for ctype funcs */
typedef __ct_rune_t __rune_t; /* rune_t (see above) */
-typedef __ct_rune_t __wchar_t; /* wchar_t (see above) */
typedef __ct_rune_t __wint_t; /* wint_t (see above) */
typedef __uint32_t __dev_t; /* device number */
diff --git a/sys/sys/stdint.h b/sys/sys/stdint.h
index aa5ac81d1017..762e8795496a 100644
--- a/sys/sys/stdint.h
+++ b/sys/sys/stdint.h
@@ -71,4 +71,8 @@ typedef __uintmax_t uintmax_t;
#define __WORDSIZE 32
#endif
+/* Limits of wchar_t. */
+#define WCHAR_MIN __WCHAR_MIN
+#define WCHAR_MAX __WCHAR_MAX
+
#endif /* !_SYS_STDINT_H_ */
diff --git a/sys/x86/include/_stdint.h b/sys/x86/include/_stdint.h
index 903b9e7e97c7..d9ee3166236b 100644
--- a/sys/x86/include/_stdint.h
+++ b/sys/x86/include/_stdint.h
@@ -180,12 +180,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/x86/include/_types.h b/sys/x86/include/_types.h
index e2806e56a424..2d6bfbca2bb7 100644
--- a/sys/x86/include/_types.h
+++ b/sys/x86/include/_types.h
@@ -142,6 +142,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.