Don't redefine wint_t (already defined in <machine/ansi.h> by NetBSD).

Fixes PR#11177.
This commit is contained in:
jlam 2000-10-16 08:56:02 +00:00
parent 77280e4fc8
commit 6aac880b3b

43
lang/gcc/patches/patch-at Normal file
View file

@ -0,0 +1,43 @@
$NetBSD: patch-at,v 1.1 2000/10/16 08:56:02 jlam Exp $
--- ../gcc-2.95.2/gcc/ginclude/stddef.h.orig Wed Dec 16 16:19:25 1998
+++ ../gcc-2.95.2/gcc/ginclude/stddef.h
@@ -45,6 +45,12 @@
#define _WCHAR_T
#endif
#endif
+/* On NetBSD, machine/ansi.h defines _BSD_WINT_T_ instead of _WINT_T. */
+#if !defined(_WINT_T_) && !defined(_BSD_WINT_T_)
+#ifndef _BSD_WINT_T_
+#define _WINT_T
+#endif
+#endif
/* Undef _FOO_T_ if we are supposed to define foo_t. */
#if defined (__need_ptrdiff_t) || defined (_STDDEF_H_)
#undef _PTRDIFF_T_
@@ -58,6 +64,10 @@
#undef _WCHAR_T_
#undef _BSD_WCHAR_T_
#endif
+#if defined (__need_wint_t) || defined (_STDDEF_H_)
+#undef _WINT_T_
+#undef _BSD_WINT_T_
+#endif
#endif /* defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) */
/* Sequent's header files use _PTRDIFF_T_ in some conflicting way.
@@ -272,12 +282,14 @@
#if defined (_STDDEF_H) || defined (__need_wint_t)
#ifndef _WINT_T
+#ifndef _BSD_WINT_T_
#define _WINT_T
#ifndef __WINT_TYPE__
#define __WINT_TYPE__ unsigned int
#endif
typedef __WINT_TYPE__ wint_t;
+#endif
#endif
#undef __need_wint_t
#endif