From fba39eafffa316f82e6f588233db8cdb7cd8ee22 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 21 Mar 2002 18:24:52 -0800 Subject: 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 --- gcc/fixinc/fixincl.x | 46 +++++++++++++++++++++++++++++++++++++++++++--- gcc/fixinc/inclhack.def | 16 ++++++++++++++++ 2 files changed, 59 insertions(+), 3 deletions(-) (limited to 'gcc/fixinc') diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x index 280948d..a128a39 100644 --- a/gcc/fixinc/fixincl.x +++ b/gcc/fixinc/fixincl.x @@ -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. * @@ -3662,6 +3662,40 @@ static const char* apzSolaris_Mutex_InitPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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 */ tSCC zStatsswtchName[] = @@ -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, diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def index 874f584..6faca9a 100644 --- a/gcc/fixinc/inclhack.def +++ b/gcc/fixinc/inclhack.def @@ -2061,6 +2061,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. */ #ifdef SONY -- cgit v1.1