inclhack.def (solaris_int_const): New fix.

* inclhack.def (solaris_int_const): New fix.
	(solaris_int_limits_1): Likewise.
	(solaris_int_limits_2): Likewise.
	* fixincl.x: Regenerate.
	* tests/base/sys/int_const.h: New file.
	* tests/base/sys/int_limits.h: Likewise.

From-SVN: r147988
This commit is contained in:
Eric Botcazou 2009-05-29 22:07:30 +00:00 committed by Eric Botcazou
parent 0a05c536a6
commit b0999b0114
5 changed files with 249 additions and 5 deletions

View File

@ -1,3 +1,12 @@
2009-05-29 Eric Botcazou <ebotcazou@adacore.com>
* inclhack.def (solaris_int_const): New fix.
(solaris_int_limits_1): Likewise.
(solaris_int_limits_2): Likewise.
* fixincl.x: Regenerate.
* tests/base/sys/int_const.h: New file.
* tests/base/sys/int_limits.h: Likewise.
2009-05-15 Joseph Myers <joseph@codesourcery.com>
* inclhack.def (glibc_tgmath): Correct bypass.

View File

@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
* It has been AutoGen-ed Friday May 15, 2009 at 07:23:47 AM PDT
* It has been AutoGen-ed Saturday May 30, 2009 at 12:11:05 AM CEST
* From the definitions inclhack.def
* and the template file fixincl
*/
/* DO NOT SVN-MERGE THIS FILE, EITHER Fri May 15 07:23:47 PDT 2009
/* DO NOT SVN-MERGE THIS FILE, EITHER Sat May 30 00:11:05 CEST 2009
*
* 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 188 fixup descriptions.
* This file contains 191 fixup descriptions.
*
* See README for more information.
*
@ -6079,6 +6079,120 @@ static const char* apzSolaris_Once_Init_2Patch[] = {
"(^#define[ \t]+PTHREAD_ONCE_INIT[ \t]+\\{\\{)(0, 0, 0, )(PTHREAD_[A-Z_]+)(\\}\\})[ \t]*$",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Solaris_Int_Const fix
*/
tSCC zSolaris_Int_ConstName[] =
"solaris_int_const";
/*
* File name selection pattern
*/
tSCC zSolaris_Int_ConstList[] =
"sys/int_const.h\0";
/*
* Machine/OS name selection pattern
*/
#define apzSolaris_Int_ConstMachs (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 SOLARIS_INT_CONST_TEST_CT 1
static tTestDesc aSolaris_Int_ConstTests[] = {
{ TT_EGREP, zSolaris_Int_ConstSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Solaris_Int_Const
*/
static const char* apzSolaris_Int_ConstPatch[] = {
"format",
"#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 };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Solaris_Int_Limits_1 fix
*/
tSCC zSolaris_Int_Limits_1Name[] =
"solaris_int_limits_1";
/*
* File name selection pattern
*/
tSCC zSolaris_Int_Limits_1List[] =
"sys/int_limits.h\0";
/*
* Machine/OS name selection pattern
*/
#define apzSolaris_Int_Limits_1Machs (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 SOLARIS_INT_LIMITS_1_TEST_CT 1
static tTestDesc aSolaris_Int_Limits_1Tests[] = {
{ TT_EGREP, zSolaris_Int_Limits_1Select0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Solaris_Int_Limits_1
*/
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 };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Solaris_Int_Limits_2 fix
*/
tSCC zSolaris_Int_Limits_2Name[] =
"solaris_int_limits_2";
/*
* File name selection pattern
*/
tSCC zSolaris_Int_Limits_2List[] =
"sys/int_limits.h\0";
/*
* Machine/OS name selection pattern
*/
#define apzSolaris_Int_Limits_2Machs (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 SOLARIS_INT_LIMITS_2_TEST_CT 1
static tTestDesc aSolaris_Int_Limits_2Tests[] = {
{ TT_EGREP, zSolaris_Int_Limits_2Select0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Solaris_Int_Limits_2
*/
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_Stdio_Tag fix
@ -7619,9 +7733,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
#define REGEX_COUNT 230
#define REGEX_COUNT 233
#define MACH_LIST_SIZE_LIMIT 181
#define FIX_COUNT 188
#define FIX_COUNT 191
/*
* Enumerate the fixes
@ -7777,6 +7891,9 @@ typedef enum {
SOLARIS_RWLOCK_INIT_1_FIXIDX,
SOLARIS_ONCE_INIT_1_FIXIDX,
SOLARIS_ONCE_INIT_2_FIXIDX,
SOLARIS_INT_CONST_FIXIDX,
SOLARIS_INT_LIMITS_1_FIXIDX,
SOLARIS_INT_LIMITS_2_FIXIDX,
SOLARIS_STDIO_TAG_FIXIDX,
STATSSWTCH_FIXIDX,
STDIO_STDARG_H_FIXIDX,
@ -8568,6 +8685,21 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
SOLARIS_ONCE_INIT_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSolaris_Once_Init_2Tests, apzSolaris_Once_Init_2Patch, 0 },
{ zSolaris_Int_ConstName, zSolaris_Int_ConstList,
apzSolaris_Int_ConstMachs,
SOLARIS_INT_CONST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSolaris_Int_ConstTests, apzSolaris_Int_ConstPatch, 0 },
{ zSolaris_Int_Limits_1Name, zSolaris_Int_Limits_1List,
apzSolaris_Int_Limits_1Machs,
SOLARIS_INT_LIMITS_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSolaris_Int_Limits_1Tests, apzSolaris_Int_Limits_1Patch, 0 },
{ zSolaris_Int_Limits_2Name, zSolaris_Int_Limits_2List,
apzSolaris_Int_Limits_2Machs,
SOLARIS_INT_LIMITS_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSolaris_Int_Limits_2Tests, apzSolaris_Int_Limits_2Patch, 0 },
{ zSolaris_Stdio_TagName, zSolaris_Stdio_TagList,
apzSolaris_Stdio_TagMachs,
SOLARIS_STDIO_TAG_TEST_CT, FD_MACH_ONLY,

View File

@ -3166,6 +3166,68 @@ fix = {
};
/*
* Sun Solaris 10 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;
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"
"(/\*.*\*/)\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)";
};
/*
* Sun Solaris 10 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;
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
* 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;
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";
};
/*
* Solaris 2.8 has what appears to be some gross workaround for
* some old version of their c++ compiler. G++ doesn't want it

View File

@ -0,0 +1,17 @@
/* DO NOT EDIT THIS FILE.
It has been auto-edited by fixincludes from:
"fixinc/tests/inc/sys/int_const.h"
This had to be done to correct non-standard usages in the
original, manufacturer supplied header file. */
#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)
#endif /* SOLARIS_INT_CONST_CHECK */

View File

@ -0,0 +1,24 @@
/* DO NOT EDIT THIS FILE.
It has been auto-edited by fixincludes from:
"fixinc/tests/inc/sys/int_limits.h"
This had to be done to correct non-standard usages in the
original, manufacturer supplied header file. */
#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 */