Fixes for NetBSD CPP builtins

Neil Booth neil@daikokuya.co.uk
Sun Jul 4 17:32:00 GMT 2004


NetBSD fails gcc.dg/cpp/assert4.c because it asserts system as unix
without defining __unix__, and doesn't assert system is bsd.

Bootstrapped and verified it fixes the failure.  OK to commit?

Neil.

	* config/netbsd.h (NETBSD_OS_CPP_BUILTINS_COMMON): Define __unix__
	and assert system is bsd.

Index: gcc/config/netbsd.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/netbsd.h,v
retrieving revision 1.26
diff -u -p -r1.26 netbsd.h
--- gcc/config/netbsd.h	27 Sep 2003 04:48:11 -0000	1.26
+++ gcc/config/netbsd.h	4 Jul 2004 17:28:43 -0000
@@ -24,6 +24,8 @@ Boston, MA 02111-1307, USA.  */
   do						\
     {						\
       builtin_define ("__NetBSD__");		\
+      builtin_define ("__unix__");		\
+      builtin_assert ("system=bsd");		\
       builtin_assert ("system=unix");		\
       builtin_assert ("system=NetBSD");		\
     }						\



More information about the Gcc-patches mailing list