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]

Patch for 38182 Compiling on NetBSD


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)

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]