diff options
author | Richard Henderson <rth@gcc.gnu.org> | 2001-09-11 01:52:39 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2001-09-11 01:52:39 -0700 |
commit | 30102605e710a95f8cb00ddd14303d7fcc284fae (patch) | |
tree | 89de0166f267747621eba79ef570f0cb00c9654a /gcc/fixinc | |
parent | b1c4394d5db5b1c73458e8927dbcedc101874e04 (diff) | |
download | gcc-30102605e710a95f8cb00ddd14303d7fcc284fae.zip gcc-30102605e710a95f8cb00ddd14303d7fcc284fae.tar.gz gcc-30102605e710a95f8cb00ddd14303d7fcc284fae.tar.bz2 |
Cray T3E port.
From-SVN: r45539
Diffstat (limited to 'gcc/fixinc')
-rw-r--r-- | gcc/fixinc/fixincl.x | 51 | ||||
-rw-r--r-- | gcc/fixinc/inclhack.def | 17 |
2 files changed, 64 insertions, 4 deletions
diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x index 873e481..79b3e7e 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 143 fixup descriptions. + * This file contains 144 fixup descriptions. * * See README for more information. * @@ -1954,7 +1954,7 @@ tSCC zHpux10_Cpp_Pow_InlineName[] = * File name selection pattern */ tSCC zHpux10_Cpp_Pow_InlineList[] = - "|math.h|"; + "|fixinc-test-limits.h|math.h|"; /* * Machine/OS name selection pattern */ @@ -5107,6 +5107,43 @@ static const char* apzUndefine_NullPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Unicosmk_Restrict fix + */ +tSCC zUnicosmk_RestrictName[] = + "unicosmk_restrict"; + +/* + * File name selection pattern + */ +tSCC zUnicosmk_RestrictList[] = + "|stdio.h|stdlib.h|wchar.h|"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzUnicosmk_RestrictMachs[] = { + "*-*-unicosmk*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zUnicosmk_RestrictSelect0[] = + "(\\*[ \t]*)restrict([ \t]+)"; + +#define UNICOSMK_RESTRICT_TEST_CT 1 +static tTestDesc aUnicosmk_RestrictTests[] = { + { TT_EGREP, zUnicosmk_RestrictSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Unicosmk_Restrict + */ +static const char* apzUnicosmk_RestrictPatch[] = { + "format", + "%1__restrict__%2", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Uw7_Byteorder_Fix fix */ tSCC zUw7_Byteorder_FixName[] = @@ -5577,9 +5614,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 150 +#define REGEX_COUNT 151 #define MACH_LIST_SIZE_LIMIT 279 -#define FIX_COUNT 143 +#define FIX_COUNT 144 /* * Enumerate the fixes @@ -5717,6 +5754,7 @@ typedef enum { ULTRIX_STATIC_FIXIDX, ULTRIX_STRINGS_FIXIDX, UNDEFINE_NULL_FIXIDX, + UNICOSMK_RESTRICT_FIXIDX, UW7_BYTEORDER_FIX_FIXIDX, VA_I960_MACRO_FIXIDX, VOID_NULL_FIXIDX, @@ -6391,6 +6429,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { UNDEFINE_NULL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aUndefine_NullTests, apzUndefine_NullPatch, 0 }, + { zUnicosmk_RestrictName, zUnicosmk_RestrictList, + apzUnicosmk_RestrictMachs, + UNICOSMK_RESTRICT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aUnicosmk_RestrictTests, apzUnicosmk_RestrictPatch, 0 }, + { zUw7_Byteorder_FixName, zUw7_Byteorder_FixList, apzUw7_Byteorder_FixMachs, UW7_BYTEORDER_FIX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def index aedf097..40194e2 100644 --- a/gcc/fixinc/inclhack.def +++ b/gcc/fixinc/inclhack.def @@ -3102,6 +3102,23 @@ fix = { test_text = "#define NULL 0UL\r\n#define NULL\t((void*)0)\n"; }; +/* + * On Cray Unicos/Mk some standard headers use the C99 keyword "restrict" + * which must be replaced by __restrict__ for GCC. + */ +fix = { + hackname = unicosmk_restrict; + files = stdio.h; + files = stdlib.h; + files = wchar.h; + mach = "*-*-unicosmk*"; + select = "(\\*[ \t]*)restrict([ \t]+)"; + + c_fix = format; + c_fix_arg = "%1__restrict__%2"; + + test_text = "void f (char * restrict x);"; +}; /* * If arpa/inet.h prototypes are incompatible with the ones we just |