Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/include On i386, prefer __WCHAR/WINT_TYPE__ wh...
details: https://anonhg.NetBSD.org/src/rev/1233b5b3e5cf
branches: trunk
changeset: 334833:1233b5b3e5cf
user: pooka <pooka%NetBSD.org@localhost>
date: Tue Dec 09 14:39:49 2014 +0000
description:
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 ;)
diffstat:
sys/arch/i386/include/ansi.h | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diffs (26 lines):
diff -r 02a68e6af36a -r 1233b5b3e5cf sys/arch/i386/include/ansi.h
--- a/sys/arch/i386/include/ansi.h Tue Dec 09 07:42:50 2014 +0000
+++ b/sys/arch/i386/include/ansi.h Tue Dec 09 14:39:49 2014 +0000
@@ -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_ */
Home |
Main Index |
Thread Index |
Old Index