This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Bug #38182


Description:
Gcc's stddef.h assumes that machine/ansi.h defines _ANSI_H_.  
NetBSD's machine/ansi.h defines _i386_ANSI_H_.  This patch 
test for _ANSI_H_ after including machine/ansi.h.  If the 
symbol is undefined, it defines it.

Testcases:
If gcc compiles, it works.

Changlog:
ensure _ANSI_H_ is defined after including machine/ansi.h

Bootstrapping and testing:
Host:  i386-unknown-netbsdelf5.99.7
Target:  i386-unknown-netbsdelf5.99.7

Patch is attached.
diff -Naur gcc-4.3.3.orig/gcc/ginclude/stddef.h gcc-4.3.3/gcc/ginclude/stddef.h
--- gcc-4.3.3.orig/gcc/ginclude/stddef.h	2005-06-24 18:11:52.000000000 -0700
+++ gcc-4.3.3/gcc/ginclude/stddef.h	2009-03-23 23:06:13.000000000 -0700
@@ -56,6 +56,9 @@
    one less case to deal with in the following.  */
 #if defined (__BSD_NET2__) || defined (____386BSD____) || (defined (__FreeBSD__) && (__FreeBSD__ < 5)) || defined(__NetBSD__)
 #include <machine/ansi.h>
+#if !defined(_ANSI_H_)
+#define _ANSI_H_
+#endif
 #endif
 /* On FreeBSD 5, machine/ansi.h does not exist anymore... */
 #if defined (__FreeBSD__) && (__FreeBSD__ >= 5)

Attachment: signature.asc
Description: This is a digitally signed message part.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]