summaryrefslogtreecommitdiffstats
path: root/sys/arm/include
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2001-05-16 22:32:44 +0000
committerobrien <obrien@FreeBSD.org>2001-05-16 22:32:44 +0000
commit89ba5881e53f6b82743a1e5ea6f9db8ad458997c (patch)
treecae039e1a2c56a600baa436c6d3915971799b673 /sys/arm/include
parent9e804492abbf2ff2087fc952f4b0b98a6e3f8ba7 (diff)
downloadFreeBSD-src-89ba5881e53f6b82743a1e5ea6f9db8ad458997c.zip
FreeBSD-src-89ba5881e53f6b82743a1e5ea6f9db8ad458997c.tar.gz
Consistently define the rune types.
Follow NetBSD's lead and add a _BSD_MBSTATE_T_ type.
Diffstat (limited to 'sys/arm/include')
-rw-r--r--sys/arm/include/ansi.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/sys/arm/include/ansi.h b/sys/arm/include/ansi.h
index deac37c..24c3ee4 100644
--- a/sys/arm/include/ansi.h
+++ b/sys/arm/include/ansi.h
@@ -88,11 +88,13 @@ typedef unsigned int __uintptr_t;
* one (perhaps nonstandard) header are defined here. Standard headers
* use _BSD_XXX_T_ without undef'ing it.
*/
-#define _BSD_CT_RUNE_T_ int /* arg type for ctype funcs */
#define _BSD_OFF_T_ __int64_t /* file offset */
#define _BSD_PID_T_ int /* process [group] */
/*
+ * NOTE: rune_t is not covered by ANSI nor other standards, and should not
+ * be instantiated outside of lib/libc/locale. Use wchar_t.
+ *
* Runes (wchar_t) is declared to be an ``int'' instead of the more natural
* ``unsigned long'' or ``long''. Two things are happening here. It is not
* unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
@@ -106,9 +108,20 @@ typedef unsigned int __uintptr_t;
* and rune_t are typedef'd, _WCHAR_T_ will be undef'd, but _RUNE_T remains
* defined for ctype.h.
*/
-#define _BSD_WCHAR_T_ int /* wchar_t */
-#define _BSD_WINT_T_ int /* wint_t */
-#define _BSD_RUNE_T_ int /* rune_t */
+#define _BSD_CT_RUNE_T_ int /* arg type for ctype funcs */
+#define _BSD_RUNE_T_ _BSD_CT_RUNE_T_ /* rune_t */
+#define _BSD_WCHAR_T_ _BSD_CT_RUNE_T_ /* wchar_t */
+#define _BSD_WINT_T_ _BSD_CT_RUNE_T_ /* wint_t */
+
+/*
+ * mbstate_t is an opaque object to keep conversion state, during multibyte
+ * stream conversions. The content must not be referenced by user programs.
+ */
+typedef union {
+ char __mbstate8[128];
+ __int64_t _mbstateL; /* for alignment */
+ } __mbstate_t;
+#define _BSD_MBSTATE_T_ __mbstate_t /* mbstate_t */
/*
* Frequencies of the clock ticks reported by clock() and times(). They
OpenPOWER on IntegriCloud