This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix gcc.dg/cpp/assert4.c for non-GNU Linux systems
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 18 Nov 2011 22:30:54 +0000 (UTC)
- Subject: Fix gcc.dg/cpp/assert4.c for non-GNU Linux systems
The testcase gcc.dg/cpp/assert4.c, which tests that #system(linux) is true
if and only if __gnu_linux__ is defined, wasn't updated for the changes
associated with Android support that arranged for __linux__ to be defined
for all systems with the Linux kernel but __gnu_linux__ only to be defined
for systems using some form of glibc (not counting uClibc) with that
kernel. I've applied this patch to make the test test __linux__ instead
of __gnu_linux__. Tested x86_64-unknown-linux-gnu.
2011-11-18 Joseph Myers <joseph@codesourcery.com>
* gcc.dg/cpp/assert4.c: Test __linux__, not __gnu_linux__.
Index: gcc.dg/cpp/assert4.c
===================================================================
--- gcc.dg/cpp/assert4.c (revision 181494)
+++ gcc.dg/cpp/assert4.c (working copy)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2006, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2006, 2008, 2009, 2011 Free Software Foundation, Inc.
Test builtin preprocessor assertions.
By Kaveh Ghazi <ghazi@caip.rutgers.edu>. */
@@ -7,7 +7,7 @@
/* Check for #system assertions. */
-#if defined __gnu_linux__
+#if defined __linux__
# if !#system(linux) || !#system(unix) || !#system(posix)
# error
# endif
--
Joseph S. Myers
joseph@codesourcery.com