[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Patches] Move bits/predefs.h multiple-inclusion guards
- To: <patches@xxxxxxxxxx>
- Subject: [Patches] Move bits/predefs.h multiple-inclusion guards
- From: "Joseph S. Myers" <joseph@xxxxxxxxxxxxxxxx>
- Date: Thu, 27 Sep 2012 22:30:54 +0000
I've applied this patch to move the multiple-inclusion guards on the
bits/predefs.h headers, an EGLIBC-specific inclusion from <stdc-predef.h>,
so that they cover the whole file. Normally the guards would come after
the check that the file isn't included directly - in this case, doing so
causes gcc.dg/pch/cpp-3.c tests to fail when GCC supports implicit
preinclusion of <stdc-predef.h>, because gcc -H warns about headers
without guards covering the whole file. So to avoid such failures (with
the GCC patch for implicit preinclusion that I originally posted in 2009,
and have now updated for GCC 4.8 and am retesting) I've applied this
EGLIBC patch; I'll apply it to 2.16 branch as well.
Index: bits/predefs.h
===================================================================
--- bits/predefs.h (revision 20898)
+++ bits/predefs.h (working copy)
@@ -16,13 +16,13 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#ifndef _PREDEFS_H
+#define _PREDEFS_H
+
#ifndef _STDC_PREDEF_H
# error "Never use <bits/predefs.h> directly; include <stdc-predef.h> instead."
#endif
-#ifndef _PREDEFS_H
-#define _PREDEFS_H
-
/* We do support the IEC 559 math functionality, real and complex. */
#define __STDC_IEC_559__ 1
#define __STDC_IEC_559_COMPLEX__ 1
Index: ports/sysdeps/arm/bits/predefs.h
===================================================================
--- ports/sysdeps/arm/bits/predefs.h (revision 20898)
+++ ports/sysdeps/arm/bits/predefs.h (working copy)
@@ -16,13 +16,13 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#ifndef _PREDEFS_H
+#define _PREDEFS_H
+
#ifndef _STDC_PREDEF_H
# error "Never use <bits/predefs.h> directly; include <stdc-predef.h> instead."
#endif
-#ifndef _PREDEFS_H
-#define _PREDEFS_H
-
/* We do support the IEC 559 math functionality, real and complex, but only
if a VFP coprocessor is present. If we don't have one, we fall back to
software emulation and the functions won't work properly. So in general,
Index: ChangeLog.eglibc
===================================================================
--- ChangeLog.eglibc (revision 20898)
+++ ChangeLog.eglibc (working copy)
@@ -1,3 +1,8 @@
+2012-09-27 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * bits/predefs.h, ports/sysdeps/arm/bits/predefs.h: Put
+ multiple-inclusion guards around the whole file.
+
2012-08-31 Maxim Kuvyrkov <maxim@xxxxxxxxxxxxxxxx>
* ports/sysdeps/powerpc/powerpc32/e500/fpu/fraiseexcept.c
--
Joseph S. Myers
joseph@xxxxxxxxxxxxxxxx
_______________________________________________
Patches mailing list
Patches@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/patches