Module Name:    src
Committed By:   pooka
Date:           Tue Dec  9 14:39:49 UTC 2014

Modified Files:
        src/sys/arch/i386/include: ansi.h

Log Message:
On i386, prefer __WCHAR/WINT_TYPE__ where available instead of hardcoded
_BSD_WCHAR_T_ value.

This mimics some other ports, and more importantly fixes compilation with
i386 compilers which define __WCHAR_TYPE__ as "long int" instead of the
"int" we had in there.  That superficial mismatch resulted in errors
such as:

lib/libc/gen/vis.c:109:1: error: array of inappropriate type initialized from 
string constant
 static const wchar_t char_shell[] = L"'`\";&<>()|{}]\\$!^~";

No change to NetBSD (our gcc does define __WCHAR_TYPE__, but it is
"int" ...  as expected ... since the NetBSD build worked ;)


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/i386/include/ansi.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/i386/include/ansi.h
diff -u src/sys/arch/i386/include/ansi.h:1.25 src/sys/arch/i386/include/ansi.h:1.26
--- src/sys/arch/i386/include/ansi.h:1.25	Sun Jul 17 20:54:41 2011
+++ src/sys/arch/i386/include/ansi.h	Tue Dec  9 14:39:49 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ansi.h,v 1.25 2011/07/17 20:54:41 joerg Exp $	*/
+/*	$NetBSD: ansi.h,v 1.26 2014/12/09 14:39:49 pooka Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -56,7 +56,16 @@
 #define	_BSD_TIMER_T_		int		/* timer_t */
 #define	_BSD_SUSECONDS_T_	int		/* suseconds_t */
 #define	_BSD_USECONDS_T_	unsigned int	/* useconds_t */
+
+#if defined(__WCHAR_TYPE__)
+#define	_BSD_WCHAR_T_		__WCHAR_TYPE__	/* wchar_t */
+#else
 #define	_BSD_WCHAR_T_		int		/* wchar_t */
+#endif
+#if defined(__WINT_TYPE__)
+#define	_BSD_WINT_T_		__WINT_TYPE__	/* wint_t */
+#else
 #define	_BSD_WINT_T_		int		/* wint_t */
+#endif
 
 #endif	/* _I386_ANSI_H_ */

Reply via email to