Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sh5/include More superh toolchain hacks. This time, ...



details:   https://anonhg.NetBSD.org/src/rev/76ac27cdad0d
branches:  trunk
changeset: 533871:76ac27cdad0d
user:      scw <scw%NetBSD.org@localhost>
date:      Wed Jul 10 12:23:08 2002 +0000

description:
More superh toolchain hacks. This time, it expects wchar_t to be a short.

diffstat:

 sys/arch/sh5/include/ansi.h       |  11 ++++++++++-
 sys/arch/sh5/include/int_limits.h |   8 +++++++-
 2 files changed, 17 insertions(+), 2 deletions(-)

diffs (52 lines):

diff -r 7a94d324efd5 -r 76ac27cdad0d sys/arch/sh5/include/ansi.h
--- a/sys/arch/sh5/include/ansi.h       Wed Jul 10 12:03:08 2002 +0000
+++ b/sys/arch/sh5/include/ansi.h       Wed Jul 10 12:23:08 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ansi.h,v 1.1 2002/07/05 13:31:55 scw Exp $     */
+/*     $NetBSD: ansi.h,v 1.2 2002/07/10 12:23:08 scw Exp $     */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -77,9 +77,18 @@
  * and rune_t are typedef'd, _WCHAR_T_ will be undef'd, but _RUNE_T remains
  * defined for ctype.h.
  */
+/*
+ * XXX: Yet another hack for the non-native sh5 toolchain
+ */
+#if __GNUC__ < 3
+#define        _BSD_WCHAR_T_           unsigned short int              /* wchar_t */
+#define        _BSD_WINT_T_            int                             /* wint_t */
+#define        _BSD_RUNE_T_            unsigned short int              /* rune_t */
+#else
 #define        _BSD_WCHAR_T_           int             /* wchar_t */
 #define        _BSD_WINT_T_            int             /* wint_t */
 #define        _BSD_RUNE_T_            int             /* rune_t */
+#endif
 
 /*
  * mbstate_t is an opaque object to keep conversion state, during multibyte
diff -r 7a94d324efd5 -r 76ac27cdad0d sys/arch/sh5/include/int_limits.h
--- a/sys/arch/sh5/include/int_limits.h Wed Jul 10 12:03:08 2002 +0000
+++ b/sys/arch/sh5/include/int_limits.h Wed Jul 10 12:23:08 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: int_limits.h,v 1.1 2002/07/05 13:31:58 scw Exp $       */
+/*     $NetBSD: int_limits.h,v 1.2 2002/07/10 12:23:08 scw Exp $       */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -147,8 +147,14 @@
 
 #ifndef WCHAR_MIN /* also possibly defined in <wchar.h> */
 /* limits of wchar_t */
+#if __GNUC__ < 3
+/* Yet another non-native toolchain hack */
+#define        WCHAR_MIN       (-0x7fff-1)                     /* wchar_t        */
+#define        WCHAR_MAX       0x7fff                          /* wchar_t        */
+#else
 #define        WCHAR_MIN       (-0x7fffffff-1)                 /* wchar_t        */
 #define        WCHAR_MAX       0x7fffffff                      /* wchar_t        */
+#endif
 
 /* limits of wint_t */
 #define        WINT_MIN        (-0x7fffffff-1)                 /* wint_t         */



Home | Main Index | Thread Index | Old Index