* [patch] PR bootstrap/47147 - fix stddef.h for NetBSD
@ 2011-01-13 21:49 Jonathan Wakely
2011-01-19 10:04 ` Jonathan Wakely
2011-01-28 16:33 ` Ian Lance Taylor
0 siblings, 2 replies; 3+ messages in thread
From: Jonathan Wakely @ 2011-01-13 21:49 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 326 bytes --]
This patch allows a bootstrap to complete on x86_64-unknown-netbsd5.99.43
2011-01-13 Jonathan Wakely <jwakely.gcc@gmail.com>
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?
[-- Attachment #2: 47147.txt --]
[-- Type: text/plain, Size: 2056 bytes --]
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 */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] PR bootstrap/47147 - fix stddef.h for NetBSD
2011-01-13 21:49 [patch] PR bootstrap/47147 - fix stddef.h for NetBSD Jonathan Wakely
@ 2011-01-19 10:04 ` Jonathan Wakely
2011-01-28 16:33 ` Ian Lance Taylor
1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Wakely @ 2011-01-19 10:04 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 637 bytes --]
pinging for review
Recent versions of NetBSD cannot build GCC on x86 without either this
fix, or a change to use the system stddef.h and ignore GCC's one, such
as
http://gcc.gnu.org/ml/gcc-help/2011-01/msg00172.html
On 13 January 2011 20:39, Jonathan Wakely wrote:
> This patch allows a bootstrap to complete on x86_64-unknown-netbsd5.99.43
>
> 2011-01-13 Jonathan Wakely <jwakely.gcc@gmail.com>
>
> 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?
>
[-- Attachment #2: 47147.txt --]
[-- Type: text/plain, Size: 2056 bytes --]
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 */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] PR bootstrap/47147 - fix stddef.h for NetBSD
2011-01-13 21:49 [patch] PR bootstrap/47147 - fix stddef.h for NetBSD Jonathan Wakely
2011-01-19 10:04 ` Jonathan Wakely
@ 2011-01-28 16:33 ` Ian Lance Taylor
1 sibling, 0 replies; 3+ messages in thread
From: Ian Lance Taylor @ 2011-01-28 16:33 UTC (permalink / raw)
To: Jonathan Wakely; +Cc: gcc-patches
On Thu, Jan 13, 2011 at 12:39 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> 2011-01-13 Jonathan Wakely <jwakely.gcc@gmail.com>
>
> PR bootstrap/47147
> * ginclude/stddef.h: Check for _X86_64_ANSI_H_ and _I386_ANSI_H_ as
> used by NetBSD.
This is OK.
Thanks.
Ian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-28 15:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-13 21:49 [patch] PR bootstrap/47147 - fix stddef.h for NetBSD Jonathan Wakely
2011-01-19 10:04 ` Jonathan Wakely
2011-01-28 16:33 ` Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).