Patch for 38182 Compiling on NetBSD

Aran Clauson aran@100acres.us
Wed Dec 16 00:55:00 GMT 2009


Gcc's stddef.h assumes machine/ansi.h defines _ANSI_H_ as 
its header guard.  NetBSD's defines a platform sepecific 
define.  For example, on amd64, the gurad is 
_X86_64_ANSI_H_.  This patch ensures _ANSI_H_ is defined 
after including machine/ansi.h

Machine is  x86_64-unknown-netbsd5.99.16

The patch is

Index: gcc/ginclude/stddef.h
===================================================================
--- gcc/ginclude/stddef.h       (revision 155261)
+++ gcc/ginclude/stddef.h       (working copy)
@@ -53,6 +53,9 @@ see the files COPYING3 and COPYING.RUNTI
    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)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20091216/cf915b0a/attachment.sig>


More information about the Gcc-patches mailing list