summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-05-01 00:47:05 +0000
committerbde <bde@FreeBSD.org>1996-05-01 00:47:05 +0000
commit8e1d546f3a9a51187a0c559640ed65b2fbcd93ae (patch)
tree146820f44572db8d1ebde09567e511dcdb91ebdd
parent7dbb860b71d5e74ddb0d45595db60de4bc241b0f (diff)
downloadFreeBSD-src-8e1d546f3a9a51187a0c559640ed65b2fbcd93ae.zip
FreeBSD-src-8e1d546f3a9a51187a0c559640ed65b2fbcd93ae.tar.gz
Oops, this should have been with the ctype changes.
Fixed longstanding namespace convolution involving rune_t vs wchar_t... This change breaks similar (but more convoluted) convolutions in the stddef.h in gcc distributions. Ports of gcc should avoid using the gcc headers.
-rw-r--r--sys/i386/include/ansi.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/sys/i386/include/ansi.h b/sys/i386/include/ansi.h
index 3108881..f7934ab 100644
--- a/sys/i386/include/ansi.h
+++ b/sys/i386/include/ansi.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ansi.h 8.2 (Berkeley) 1/4/94
- * $Id: ansi.h,v 1.8 1995/06/28 01:39:26 bde Exp $
+ * $Id: ansi.h,v 1.9 1996/04/13 14:25:06 bde Exp $
*/
#ifndef _MACHINE_ANSI_H_
@@ -48,9 +48,11 @@
*/
#define _BSD_CLOCK_T_ unsigned long /* clock() */
#define _BSD_PTRDIFF_T_ int /* ptr1 - ptr2 */
+#define _BSD_RUNE_T_ _BSD_CT_RUNE_T_ /* rune_t (see below) */
#define _BSD_SIZE_T_ unsigned int /* sizeof() */
#define _BSD_SSIZE_T_ int /* byte count or error */
#define _BSD_TIME_T_ long /* time() */
+#define _BSD_WCHAR_T_ _BSD_CT_RUNE_T_ /* wchar_t (see below) */
/*
* Types which are fundamental to the implementation and must be used
@@ -58,26 +60,22 @@
* 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_ long long /* file offset */
#define _BSD_PID_T_ int /* process [group] */
#define _BSD_VA_LIST_ char * /* va_list */
/*
- * Runes (wchar_t) is declared to be an ``int'' instead of the more natural
+ * The rune type 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.
+ * ANSI C), but they use _BSD_CT_RUNE_T_ instead of int. By changing it
+ * here, you lose a bit of ANSI conformance, but your programs will still
+ * work.
*/
-#define _BSD_WCHAR_T_ int /* wchar_t */
-#define _BSD_RUNE_T_ int /* rune_t */
/*
* Frequencies of the clock ticks reported by clock() and times(). They
@@ -92,4 +90,4 @@
#define _BSD_CLK_TCK_ 128
#define _BSD_CLOCKS_PER_SEC_ 128
-#endif /* !_MACHINE_ANSI_H_ */
+#endif /* !_MACHINE_ANSI_H_ */
OpenPOWER on IntegriCloud