This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Apply <sys/int_const.h> and <sys/int_limits.h> fixes on Solaris 11
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Bruce Korb <bkorb at gnu dot org>
- Date: Thu, 28 Jan 2010 13:42:47 +0100
- Subject: PATCH: Apply <sys/int_const.h> and <sys/int_limits.h> fixes on Solaris 11
Unlike Solaris 10, two of the gcc.dg/c99-stdint-?.c tests still fail on
Solaris 11 (both 32 and 64-bit):
FAIL: gcc.dg/c99-stdint-1.c (test for excess errors)
FAIL: gcc.dg/c99-stdint-7.c (test for excess errors)
It turns out the appropriate fixincludes fixes weren't applied. This
happens because Solaris 11/OpenSolaris changed from SCCS to Mercurial as
their VCS, meaning that either the unexpanded SCCS keywords show up in
the system headers or they are removed altogether.
To fix this, I've chosen not to trigger the fix on the SCCS Id but
rather on the Solaris version (*-*-solaris2* since AFAIK the affected
headers date back to at least Solaris 2.6). The following patch does
this, passes make check and, together with
http://gcc.gnu.org/ml/gcc-patches/2010-01/msg01451.html
allows all of the c99-stdint-?.c tests to pass on all of 32- and 64-bit
Solaris 10/11, both SPARC and x86.
Ok for mainline?
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2010-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* inclhack.def (solaris_int_const, solaris_int_limits_1,
solaris_int_limits_2): Applies to Solaris 11, too.
Remove select.
Add mach for *-*-solaris2*.
* fixincl.x: Regenerate.
* tests/base/sys/int_const.h [SOLARIS_INT_CONST_CHECK]: Remove
#pragma trigger text.
* tests/base/sys/int_limits.h [SOLARIS_INT_LIMITS_1_CHECK,
SOLARIS_INT_LIMITS_2_CHECK]: Likewise.
diff -r 639f1353c2b9 fixincludes/inclhack.def
--- a/fixincludes/inclhack.def Mon Jan 25 10:22:04 2010 +0000
+++ b/fixincludes/inclhack.def Thu Jan 28 12:50:16 2010 +0100
@@ -3441,13 +3522,13 @@
/*
- * Sun Solaris 10 has a version of sys/int_const.h that defines
+ * Sun Solaris 2 has a version of sys/int_const.h that defines
* UINT8_C and UINT16_C to unsigned constants.
*/
fix = {
hackname = solaris_int_const;
- select = '@\(#\)int_const.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
files = sys/int_const.h;
+ mach = '*-*-solaris2*';
c_fix = format;
c_fix_arg = "#define\tUINT8_C(c)\t(c)\n"
"%1\n"
@@ -3456,7 +3537,6 @@
"(/\*.*\*/)\n"
"#define[ \t]+UINT16_C\\(c\\)[ \t]+__CONCAT__.*";
test_text =
- '#pragma ident "@(#)int_const.h 1.5 04/09/28 SMI"'"\n"
"#define UINT8_C(c) __CONCAT__(c,u)\n"
"/* CSTYLED */\n"
"#define UINT16_C(c) __CONCAT__(c,u)";
@@ -3464,38 +3544,36 @@
/*
- * Sun Solaris 10 has a version of sys/int_limits.h that defines
+ * Sun Solaris 2 has a version of sys/int_limits.h that defines
* UINT8_MAX and UINT16_MAX to unsigned constants.
*/
fix = {
hackname = solaris_int_limits_1;
- select = '@\(#\)int_limits.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
files = sys/int_limits.h;
+ mach = '*-*-solaris2*';
c_fix = format;
c_fix_arg = "#define\tUINT8_MAX\t(255)\n"
"#define\tUINT16_MAX\t(65535)";
c_fix_arg = "^#define[ \t]+UINT8_MAX[ \t]+\\(255U\\)\n"
"#define[ \t]+UINT16_MAX[ \t]+\\(65535U\\)";
test_text =
- '#pragma ident "@(#)int_limits.h 1.9 04/09/28 SMI"'"\n"
"#define UINT8_MAX (255U)\n"
"#define UINT16_MAX (65535U)";
};
/*
- * Sun Solaris 10 has a version of sys/int_limits.h that defines
+ * Sun Solaris 2 has a version of sys/int_limits.h that defines
* INT_FAST16 limits to wrong values for sys/int_types.h.
*/
fix = {
hackname = solaris_int_limits_2;
- select = '@\(#\)int_limits.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
files = sys/int_limits.h;
+ mach = '*-*-solaris2*';
c_fix = format;
c_fix_arg = "#define\t%1_FAST16_%2 %132_%2";
c_fix_arg = "^#define[ \t]+(INT|UINT)_FAST16_(MAX|MIN)[ \t](INT|UINT)16.*";
test_text =
- '#pragma ident "@(#)int_limits.h 1.9 04/09/28 SMI"'"\n"
"#define INT_FAST16_MAX INT16_MAX\n"
"#define UINT_FAST16_MAX UINT16_MAX\n"
"#define INT_FAST16_MIN INT16_MIN";
diff -r 639f1353c2b9 fixincludes/tests/base/sys/int_const.h
--- a/fixincludes/tests/base/sys/int_const.h Mon Jan 25 10:22:04 2010 +0000
+++ b/fixincludes/tests/base/sys/int_const.h Thu Jan 28 12:50:16 2010 +0100
@@ -10,7 +10,6 @@
#if defined( SOLARIS_INT_CONST_CHECK )
-#pragma ident "@(#)int_const.h 1.5 04/09/28 SMI"
#define UINT8_C(c) (c)
/* CSTYLED */
#define UINT16_C(c) (c)
diff -r 639f1353c2b9 fixincludes/tests/base/sys/int_limits.h
--- a/fixincludes/tests/base/sys/int_limits.h Mon Jan 25 10:22:04 2010 +0000
+++ b/fixincludes/tests/base/sys/int_limits.h Thu Jan 28 12:50:16 2010 +0100
@@ -10,15 +10,18 @@
#if defined( SOLARIS_INT_LIMITS_1_CHECK )
-#pragma ident "@(#)int_limits.h 1.9 04/09/28 SMI"
#define UINT8_MAX (255)
#define UINT16_MAX (65535)
#endif /* SOLARIS_INT_LIMITS_1_CHECK */
#if defined( SOLARIS_INT_LIMITS_2_CHECK )
-#pragma ident "@(#)int_limits.h 1.9 04/09/28 SMI"
#define INT_FAST16_MAX INT32_MAX
#define UINT_FAST16_MAX UINT32_MAX
#define INT_FAST16_MIN INT32_MIN
#endif /* SOLARIS_INT_LIMITS_2_CHECK */