inclhack.def (solaris_int_types): New fix.

* inclhack.def (solaris_int_types): New fix.
	* fixincl.x: Regenerate.
	* tests/base/sys/int_types.h: New file.

From-SVN: r149209
This commit is contained in:
Eric Botcazou 2009-07-03 20:27:05 +00:00 committed by Eric Botcazou
parent d73fb533dc
commit d4289bdd6d
4 changed files with 102 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2009-07-03 Eric Botcazou <ebotcazou@adacore.com>
* inclhack.def (solaris_int_types): New fix.
* fixincl.x: Regenerate.
* tests/base/sys/int_types.h: New file.
2009-06-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
* inclhack.def (darwin_stdint_1, darwin_stdint_2, darwin_stdint_3,

View File

@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
* It has been AutoGen-ed Monday June 8, 2009 at 08:37:38 PM CEST
* It has been AutoGen-ed Friday July 3, 2009 at 10:27:01 PM CEST
* From the definitions inclhack.def
* and the template file fixincl
*/
/* DO NOT SVN-MERGE THIS FILE, EITHER Mon Jun 8 20:37:38 CEST 2009
/* DO NOT SVN-MERGE THIS FILE, EITHER Fri Jul 3 22:27:01 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 195 fixup descriptions.
* This file contains 196 fixup descriptions.
*
* See README for more information.
*
@ -6371,6 +6371,48 @@ static const char* apzSolaris_Int_Limits_2Patch[] = {
"^#define[ \t]+(INT|UINT)_FAST16_(MAX|MIN)[ \t](INT|UINT)16.*",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Solaris_Int_Types fix
*/
tSCC zSolaris_Int_TypesName[] =
"solaris_int_types";
/*
* File name selection pattern
*/
tSCC zSolaris_Int_TypesList[] =
"sys/int_types.h\0";
/*
* Machine/OS name selection pattern
*/
#define apzSolaris_Int_TypesMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zSolaris_Int_TypesSelect0[] =
"__STDC__ - 0 == 0";
/*
* content bypass pattern - skip fix if pattern found
*/
tSCC zSolaris_Int_TypesBypass0[] =
"_LONGLONG_TYPE";
#define SOLARIS_INT_TYPES_TEST_CT 2
static tTestDesc aSolaris_Int_TypesTests[] = {
{ TT_NEGREP, zSolaris_Int_TypesBypass0, (regex_t*)NULL },
{ TT_EGREP, zSolaris_Int_TypesSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Solaris_Int_Types
*/
static const char* apzSolaris_Int_TypesPatch[] = {
"format",
"(defined(_STDC_C99) || !defined(_STRICT_STDC) || defined(__GNUC__))",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Solaris_Stdio_Tag fix
@ -7911,9 +7953,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
#define REGEX_COUNT 237
#define REGEX_COUNT 239
#define MACH_LIST_SIZE_LIMIT 181
#define FIX_COUNT 195
#define FIX_COUNT 196
/*
* Enumerate the fixes
@ -8076,6 +8118,7 @@ typedef enum {
SOLARIS_INT_CONST_FIXIDX,
SOLARIS_INT_LIMITS_1_FIXIDX,
SOLARIS_INT_LIMITS_2_FIXIDX,
SOLARIS_INT_TYPES_FIXIDX,
SOLARIS_STDIO_TAG_FIXIDX,
STATSSWTCH_FIXIDX,
STDIO_STDARG_H_FIXIDX,
@ -8902,6 +8945,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_TypesName, zSolaris_Int_TypesList,
apzSolaris_Int_TypesMachs,
SOLARIS_INT_TYPES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSolaris_Int_TypesTests, apzSolaris_Int_TypesPatch, 0 },
{ zSolaris_Stdio_TagName, zSolaris_Stdio_TagList,
apzSolaris_Stdio_TagMachs,
SOLARIS_STDIO_TAG_TEST_CT, FD_MACH_ONLY,

View File

@ -3331,7 +3331,29 @@ fix = {
/*
* Solaris 2.8 has what appears to be some gross workaround for
* 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.
*/
fix = {
hackname = solaris_int_types;
select = "__STDC__ - 0 == 0";
bypass = "_LONGLONG_TYPE";
files = sys/int_types.h;
c_fix = format;
c_fix_arg =
"(defined(_STDC_C99) || !defined(_STRICT_STDC) || defined(__GNUC__))";
test_text =
"#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n"
"typedef long long int64_t;\n"
"#endif\n\n"
"#if defined(_LP64) || (__STDC__ - 0 == 0 && !defined(_NO_LONGLONG))\n"
"typedef int64_t intmax_t;\n"
"#endif";
};
/*
* Sun Solaris 8 has what appears to be some gross workaround for
* some old version of their c++ compiler. G++ doesn't want it
* either, but doesn't want to be tied to SunPRO version numbers.
*/

View File

@ -0,0 +1,20 @@
/* DO NOT EDIT THIS FILE.
It has been auto-edited by fixincludes from:
"fixinc/tests/inc/sys/int_types.h"
This had to be done to correct non-standard usages in the
original, manufacturer supplied header file. */
#if defined( SOLARIS_INT_TYPES_CHECK )
#if (defined(_STDC_C99) || !defined(_STRICT_STDC) || defined(__GNUC__)) && !defined(_NO_LONGLONG)
typedef long long int64_t;
#endif
#if defined(_LP64) || ((defined(_STDC_C99) || !defined(_STRICT_STDC) || defined(__GNUC__)) && !defined(_NO_LONGLONG))
typedef int64_t intmax_t;
#endif
#endif /* SOLARIS_INT_TYPES_CHECK */