From 6aac880b3bee8f81d0171e8bfc5aee4dfd6263e5 Mon Sep 17 00:00:00 2001 From: jlam Date: Mon, 16 Oct 2000 08:56:02 +0000 Subject: [PATCH] Don't redefine wint_t (already defined in by NetBSD). Fixes PR#11177. --- lang/gcc/patches/patch-at | 43 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 lang/gcc/patches/patch-at diff --git a/lang/gcc/patches/patch-at b/lang/gcc/patches/patch-at new file mode 100644 index 000000000000..ee97dc65dd3a --- /dev/null +++ b/lang/gcc/patches/patch-at @@ -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