re PR target/5996 (libstdc++ (FILE related) sparc-sun-solaris2.8 bootstrap failure)

PR target/5996
        * fixinc/inclhack.def (solaris_stdio_tag): New.
        * fixinc/fixincl.x: Regenerate.

From-SVN: r51158
This commit is contained in:
Richard Henderson 2002-03-21 18:24:52 -08:00 committed by Richard Henderson
parent eba8099439
commit fba39eafff
3 changed files with 65 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2002-03-21 Richard Henderson <rth@redhat.com>
PR target/5996
* fixinc/inclhack.def (solaris_stdio_tag): New.
* fixinc/fixincl.x: Regenerate.
2002-03-21 Eric Botcazou <ebotcazou@multimania.com>
PR c/5597

View File

@ -5,7 +5,7 @@
* files which are fixed to work correctly with ANSI C and placed in a
* directory that GNU C will search.
*
* This file contains 139 fixup descriptions.
* This file contains 140 fixup descriptions.
*
* See README for more information.
*
@ -3660,6 +3660,40 @@ static const char* apzSolaris_Mutex_InitPatch[] = {
"(^#define[ \t]+PTHREAD_(MUTEX|COND)_INITIALIZER[ \t]+{.*),[ \t]*0}(|[ \t].*)$",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Solaris_Stdio_Tag fix
*/
tSCC zSolaris_Stdio_TagName[] =
"solaris_stdio_tag";
/*
* File name selection pattern
*/
tSCC zSolaris_Stdio_TagList[] =
"|stdio_tag.h|";
/*
* Machine/OS name selection pattern
*/
#define apzSolaris_Stdio_TagMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zSolaris_Stdio_TagSelect0[] =
"__cplusplus < 54321L";
#define SOLARIS_STDIO_TAG_TEST_CT 1
static tTestDesc aSolaris_Stdio_TagTests[] = {
{ TT_EGREP, zSolaris_Stdio_TagSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Solaris_Stdio_Tag
*/
static const char* apzSolaris_Stdio_TagPatch[] = { "sed",
"-e", "s/defined(__cplusplus) && (__cplusplus < 54321L)/0/",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Statsswtch fix
@ -5470,9 +5504,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
#define REGEX_COUNT 148
#define REGEX_COUNT 149
#define MACH_LIST_SIZE_LIMIT 279
#define FIX_COUNT 139
#define FIX_COUNT 140
/*
* Enumerate the fixes
@ -5570,6 +5604,7 @@ typedef enum {
SCO_STATIC_FUNC_FIXIDX,
SCO_UTIME_FIXIDX,
SOLARIS_MUTEX_INIT_FIXIDX,
SOLARIS_STDIO_TAG_FIXIDX,
STATSSWTCH_FIXIDX,
STDIO_STDARG_H_FIXIDX,
STDIO_VA_LIST_FIXIDX,
@ -6080,6 +6115,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
SOLARIS_MUTEX_INIT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSolaris_Mutex_InitTests, apzSolaris_Mutex_InitPatch, 0 },
{ zSolaris_Stdio_TagName, zSolaris_Stdio_TagList,
apzSolaris_Stdio_TagMachs,
SOLARIS_STDIO_TAG_TEST_CT, FD_MACH_ONLY,
aSolaris_Stdio_TagTests, apzSolaris_Stdio_TagPatch, 0 },
{ zStatsswtchName, zStatsswtchList,
apzStatsswtchMachs,
STATSSWTCH_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,

View File

@ -2060,6 +2060,22 @@ fix = {
};
/*
* Solaris 2.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.
*/
fix = {
hackname = solaris_stdio_tag;
files = stdio_tag.h;
select = '__cplusplus < 54321L';
sed = 's/defined(__cplusplus) && (__cplusplus < 54321L)/0/';
test_text = '#if\tdefined(__cplusplus) && (__cplusplus < 54321L)';
};
/*
* Sony NEWSOS 5.0 does not support the complete ANSI C standard.
*/