diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index e1c8d58aa14..667d3dfe7b8 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,22 @@ +2010-01-29 Rainer Orth + + * inclhack.def (solaris_int_limits_3): New fix. + * fixincl.x: Regenerate. + * tests/base/sys/int_limits.h [SOLARIS_INT_LIMITS_3_CHECK]: New + test. + + * inclhack.def (solaris_int_const, solaris_int_limits_1, + solaris_int_limits_2 ): Applies to Solaris 2 in general. + Remove select. + Add mach for *-*-solaris2*. + Change second c_fix_arg to select. + Remove #pragma ident from test_text. + * 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. + 2010-01-26 Rainer Orth * inclhack.def (aix_stdint_1): Add stdint-aix.h to files. diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index 907df7d1eb8..fa05d88eedf 100644 --- a/fixincludes/fixincl.x +++ b/fixincludes/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed Tuesday January 26, 2010 at 08:17:12 PM MET + * It has been AutoGen-ed Friday January 29, 2010 at 04:49:43 PM MET * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Tue Jan 26 20:17:12 MET 2010 +/* DO NOT SVN-MERGE THIS FILE, EITHER Fri Jan 29 16:49:43 MET 2010 * * You must regenerate it. Use the ./genfixes script. * @@ -15,7 +15,7 @@ * certain ANSI-incompatible system header files which are fixed to work * correctly with ANSI C and placed in a directory that GNU C will search. * - * This file contains 204 fixup descriptions. + * This file contains 205 fixup descriptions. * * See README for more information. * @@ -6635,13 +6635,17 @@ tSCC zSolaris_Int_ConstList[] = /* * Machine/OS name selection pattern */ -#define apzSolaris_Int_ConstMachs (const char**)NULL +tSCC* apzSolaris_Int_ConstMachs[] = { + "*-*-solaris2*", + (const char*)NULL }; /* * content selection pattern - do fix if pattern found */ tSCC zSolaris_Int_ConstSelect0[] = - "@\\(#\\)int_const.h[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI"; + "^#define[ \t]+UINT8_C\\(c\\)[ \t]+__CONCAT__.*\n\ +(/*.**/)\n\ +#define[ \t]+UINT16_C\\(c\\)[ \t]+__CONCAT__.*"; #define SOLARIS_INT_CONST_TEST_CT 1 static tTestDesc aSolaris_Int_ConstTests[] = { @@ -6655,9 +6659,6 @@ static const char* apzSolaris_Int_ConstPatch[] = { "#define\tUINT8_C(c)\t(c)\n\ %1\n\ #define\tUINT16_C(c)\t(c)", - "^#define[ \t]+UINT8_C\\(c\\)[ \t]+__CONCAT__.*\n\ -(/*.**/)\n\ -#define[ \t]+UINT16_C\\(c\\)[ \t]+__CONCAT__.*", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -6675,13 +6676,16 @@ tSCC zSolaris_Int_Limits_1List[] = /* * Machine/OS name selection pattern */ -#define apzSolaris_Int_Limits_1Machs (const char**)NULL +tSCC* apzSolaris_Int_Limits_1Machs[] = { + "*-*-solaris2*", + (const char*)NULL }; /* * content selection pattern - do fix if pattern found */ tSCC zSolaris_Int_Limits_1Select0[] = - "@\\(#\\)int_limits.h[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI"; + "^#define[ \t]+UINT8_MAX[ \t]+\\(255U\\)\n\ +#define[ \t]+UINT16_MAX[ \t]+\\(65535U\\)"; #define SOLARIS_INT_LIMITS_1_TEST_CT 1 static tTestDesc aSolaris_Int_Limits_1Tests[] = { @@ -6694,8 +6698,6 @@ static const char* apzSolaris_Int_Limits_1Patch[] = { "format", "#define\tUINT8_MAX\t(255)\n\ #define\tUINT16_MAX\t(65535)", - "^#define[ \t]+UINT8_MAX[ \t]+\\(255U\\)\n\ -#define[ \t]+UINT16_MAX[ \t]+\\(65535U\\)", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -6713,13 +6715,15 @@ tSCC zSolaris_Int_Limits_2List[] = /* * Machine/OS name selection pattern */ -#define apzSolaris_Int_Limits_2Machs (const char**)NULL +tSCC* apzSolaris_Int_Limits_2Machs[] = { + "*-*-solaris2*", + (const char*)NULL }; /* * content selection pattern - do fix if pattern found */ tSCC zSolaris_Int_Limits_2Select0[] = - "@\\(#\\)int_limits.h[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI"; + "^#define[ \t]+(INT|UINT)_FAST16_(MAX|MIN)[ \t](INT|UINT)16.*"; #define SOLARIS_INT_LIMITS_2_TEST_CT 1 static tTestDesc aSolaris_Int_Limits_2Tests[] = { @@ -6731,7 +6735,43 @@ static tTestDesc aSolaris_Int_Limits_2Tests[] = { static const char* apzSolaris_Int_Limits_2Patch[] = { "format", "#define\t%1_FAST16_%2 %132_%2", - "^#define[ \t]+(INT|UINT)_FAST16_(MAX|MIN)[ \t](INT|UINT)16.*", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Solaris_Int_Limits_3 fix + */ +tSCC zSolaris_Int_Limits_3Name[] = + "solaris_int_limits_3"; + +/* + * File name selection pattern + */ +tSCC zSolaris_Int_Limits_3List[] = + "sys/int_limits.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzSolaris_Int_Limits_3Machs[] = { + "*-*-solaris2*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zSolaris_Int_Limits_3Select0[] = + "^#define[ \t]+SIZE_MAX[ \t]+4294967295UL"; + +#define SOLARIS_INT_LIMITS_3_TEST_CT 1 +static tTestDesc aSolaris_Int_Limits_3Tests[] = { + { TT_EGREP, zSolaris_Int_Limits_3Select0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Solaris_Int_Limits_3 + */ +static const char* apzSolaris_Int_Limits_3Patch[] = { + "format", + "#define\tSIZE_MAX\t4294967295U", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -8316,9 +8356,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 244 +#define REGEX_COUNT 245 #define MACH_LIST_SIZE_LIMIT 181 -#define FIX_COUNT 204 +#define FIX_COUNT 205 /* * Enumerate the fixes @@ -8489,6 +8529,7 @@ typedef enum { SOLARIS_INT_CONST_FIXIDX, SOLARIS_INT_LIMITS_1_FIXIDX, SOLARIS_INT_LIMITS_2_FIXIDX, + SOLARIS_INT_LIMITS_3_FIXIDX, SOLARIS_INT_TYPES_FIXIDX, SOLARIS_STDIO_TAG_FIXIDX, STATSSWTCH_FIXIDX, @@ -9356,6 +9397,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { SOLARIS_INT_LIMITS_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aSolaris_Int_Limits_2Tests, apzSolaris_Int_Limits_2Patch, 0 }, + { zSolaris_Int_Limits_3Name, zSolaris_Int_Limits_3List, + apzSolaris_Int_Limits_3Machs, + SOLARIS_INT_LIMITS_3_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aSolaris_Int_Limits_3Tests, apzSolaris_Int_Limits_3Patch, 0 }, + { zSolaris_Int_TypesName, zSolaris_Int_TypesList, apzSolaris_Int_TypesMachs, SOLARIS_INT_TYPES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index ad19ccd574a..8240b7dcf2b 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -3522,22 +3522,21 @@ fix = { /* - * 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" "#define\tUINT16_C(c)\t(c)"; - c_fix_arg = "^#define[ \t]+UINT8_C\\(c\\)[ \t]+__CONCAT__.*\n" + select = "^#define[ \t]+UINT8_C\\(c\\)[ \t]+__CONCAT__.*\n" "(/\*.*\*/)\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)"; @@ -3545,44 +3544,58 @@ fix = { /* - * 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" + select = "^#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.*"; + select = "^#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"; }; +/* + * Sun Solaris 2 has a version of sys/int_limits.h that defines + * SIZE_MAX as unsigned long. + */ +fix = { + hackname = solaris_int_limits_3; + files = sys/int_limits.h; + mach = '*-*-solaris2*'; + c_fix = format; + c_fix_arg = "#define\tSIZE_MAX\t4294967295U"; + select = "^#define[ \t]+SIZE_MAX[ \t]+4294967295UL"; + test_text = + "#define SIZE_MAX 4294967295UL"; +}; + + /* * Sun Solaris up to 9 has a version of sys/int_types.h that forbids use * of Standard C99 64-bit types in 32-bit mode. diff --git a/fixincludes/tests/base/sys/int_const.h b/fixincludes/tests/base/sys/int_const.h index 7aeb52a79ce..6f71a15ecf9 100644 --- a/fixincludes/tests/base/sys/int_const.h +++ b/fixincludes/tests/base/sys/int_const.h @@ -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 --git a/fixincludes/tests/base/sys/int_limits.h b/fixincludes/tests/base/sys/int_limits.h index 19acbe50a46..bcacd68a9c3 100644 --- a/fixincludes/tests/base/sys/int_limits.h +++ b/fixincludes/tests/base/sys/int_limits.h @@ -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 */ + + +#if defined( SOLARIS_INT_LIMITS_3_CHECK ) +#define SIZE_MAX 4294967295U +#endif /* SOLARIS_INT_LIMITS_3_CHECK */