From patchwork Thu Jan 13 20:39:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 78810 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 8665BB6F10 for ; Fri, 14 Jan 2011 07:39:47 +1100 (EST) Received: (qmail 29286 invoked by alias); 13 Jan 2011 20:39:44 -0000 Received: (qmail 29271 invoked by uid 22791); 13 Jan 2011 20:39:43 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RFC_ABUSE_POST, TW_TD X-Spam-Check-By: sourceware.org Received: from mail-ew0-f47.google.com (HELO mail-ew0-f47.google.com) (209.85.215.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 13 Jan 2011 20:39:34 +0000 Received: by ewy28 with SMTP id 28so1093829ewy.20 for ; Thu, 13 Jan 2011 12:39:32 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.163.11 with SMTP id z11mr2407469wek.36.1294951171769; Thu, 13 Jan 2011 12:39:31 -0800 (PST) Received: by 10.216.160.131 with HTTP; Thu, 13 Jan 2011 12:39:31 -0800 (PST) Date: Thu, 13 Jan 2011 20:39:31 +0000 Message-ID: Subject: [patch] PR bootstrap/47147 - fix stddef.h for NetBSD From: Jonathan Wakely To: gcc-patches Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This patch allows a bootstrap to complete on x86_64-unknown-netbsd5.99.43 2011-01-13 Jonathan Wakely PR bootstrap/47147 * ginclude/stddef.h: Check for _X86_64_ANSI_H_ and _I386_ANSI_H_ as used by NetBSD. bootstrapped on x86_64-netbsd tested on x86_64-linux ok for trunk? Index: ginclude/stddef.h =================================================================== --- ginclude/stddef.h (revision 168732) +++ ginclude/stddef.h (working copy) @@ -61,8 +61,9 @@ see the files COPYING3 and COPYING.RUNTI /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are defined if the corresponding type is *not* defined. - FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_ */ -#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) + FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_. + NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */ +#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) || defined(_X86_64_ANSI_H_) || defined(_I386_ANSI_H_) #if !defined(_SIZE_T_) && !defined(_BSD_SIZE_T_) #define _SIZE_T #endif @@ -89,7 +90,7 @@ see the files COPYING3 and COPYING.RUNTI #undef _WCHAR_T_ #undef _BSD_WCHAR_T_ #endif -#endif /* defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) */ +#endif /* defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) || defined(_X86_64_ANSI_H_) || defined(_I386_ANSI_H_) */ /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. Just ignore it. */ @@ -357,7 +358,8 @@ typedef __WINT_TYPE__ wint_t; /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. are already defined. */ /* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */ -#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) +/* NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. */ +#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) || defined(_X86_64_ANSI_H_) || defined(_I386_ANSI_H_) /* The references to _GCC_PTRDIFF_T_, _GCC_SIZE_T_, and _GCC_WCHAR_T_ are probably typos and should be removed before 2.8 is released. */ #ifdef _GCC_PTRDIFF_T_ @@ -385,7 +387,7 @@ typedef __WINT_TYPE__ wint_t; #undef _WCHAR_T_ #undef _BSD_WCHAR_T_ #endif -#endif /* _ANSI_H_ || _MACHINE_ANSI_H_ */ +#endif /* _ANSI_H_ || _MACHINE_ANSI_H_ || _X86_64_ANSI_H_ || _I386_ANSI_H_ */ #endif /* __sys_stdtypes_h */