This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fixes for NetBSD CPP builtins
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Jason R Thorpe <thorpej at wasabisystems dot com>
- Date: Sun, 4 Jul 2004 18:33:45 +0100
- Subject: Fixes for NetBSD CPP builtins
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"); \
} \