summaryrefslogtreecommitdiff
path: root/gcc/fixinc
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-11 08:52:39 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-11 08:52:39 +0000
commit9caef960d5d09da7280ba0b8a8d1fa6d35e5d9da (patch)
tree89de0166f267747621eba79ef570f0cb00c9654a /gcc/fixinc
parent2b8cc44448c3b81dd9e83f0b01aa4085e25b7d44 (diff)
downloadgcc-9caef960d5d09da7280ba0b8a8d1fa6d35e5d9da.tar.gz
Cray T3E port.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45539 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixinc')
-rw-r--r--gcc/fixinc/fixincl.x51
-rw-r--r--gcc/fixinc/inclhack.def17
2 files changed, 64 insertions, 4 deletions
diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x
index 873e481c421..79b3e7e67fd 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 aedf09713d3..40194e2fd08 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