Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/vax/include Add the types needed by the new locale ...
details: https://anonhg.NetBSD.org/src/rev/b7aa0e18a56f
branches: trunk
changeset: 502177:b7aa0e18a56f
user: matt <matt%NetBSD.org@localhost>
date: Sat Jan 13 03:48:26 2001 +0000
description:
Add the types needed by the new locale code.
diffstat:
sys/arch/vax/include/ansi.h | 33 ++++++++++++++++++++++++++++++++-
1 files changed, 32 insertions(+), 1 deletions(-)
diffs (53 lines):
diff -r cd28e2b0ede6 -r b7aa0e18a56f sys/arch/vax/include/ansi.h
--- a/sys/arch/vax/include/ansi.h Sat Jan 13 02:17:50 2001 +0000
+++ b/sys/arch/vax/include/ansi.h Sat Jan 13 03:48:26 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ansi.h,v 1.12 2000/07/17 02:52:24 matt Exp $ */
+/* $NetBSD: ansi.h,v 1.13 2001/01/13 03:48:26 matt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -39,6 +39,7 @@
#define _ANSI_H_
#include <sys/cdefs.h>
+#include <machine/int_types.h>
/*
* Types which are fundamental to the implementation and may appear in
@@ -74,5 +75,35 @@
#define _BSD_SUSECONDS_T_ int /* suseconds_t */
#define _BSD_USECONDS_T_ unsigned int /* useconds_t */
+/*
+ * 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,
+ * it looks like 10646 will be a 31 bit standard. This means that if your
+ * ints cannot hold 32 bits, you will be in trouble. The reason an int was
+ * chosen over a long is that the is*() and to*() routines take ints (says
+ * ANSI C), but they use _RUNE_T_ instead of int. By changing it here, you
+ * lose a bit of ANSI conformance, but your programs will still work.
+ *
+ * Note that _WCHAR_T_ and _RUNE_T_ must be of the same type. When wchar_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 */
+
+/*
+ * 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 */
#endif /* _ANSI_H_ */
Home |
Main Index |
Thread Index |
Old Index