]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
iris6.h (CPLUSPLUS_CPP_SPEC): Define __c99.
authorRainer Orth <ro@TechFak.Uni-Bielefeld.DE>
Thu, 27 Mar 2003 20:08:16 +0000 (20:08 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Thu, 27 Mar 2003 20:08:16 +0000 (20:08 +0000)
* config/mips/iris6.h (CPLUSPLUS_CPP_SPEC): Define __c99.

* fixinc/inclhack.def (irix___restrict): Don't change __restrict
for C++ on IRIX 6.5.1[89].
* fixinc/tests/base/internal/sgimacros.h: New file.

* fixinc/inclhack.def (irix_wcsftime): Use XPG5 variant for C99.
* fixinc/fixincl.x: Regenerate.
* fixinc/tests/base/internal/wchar_core.h: New file.

From-SVN: r64930

gcc/ChangeLog
gcc/config/mips/iris6.h
gcc/fixinc/fixincl.x
gcc/fixinc/inclhack.def

index 8532a73e15fd1249dcbc22ac6ebe6f566e26fb97..9b2fbce0783df2601d2d46653d3e33ccdbc75001 100644 (file)
@@ -1,3 +1,15 @@
+2003-03-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
+
+       * config/mips/iris6.h (CPLUSPLUS_CPP_SPEC): Define __c99.
+
+       * fixinc/inclhack.def (irix___restrict): Don't change __restrict
+       for C++ on IRIX 6.5.1[89].
+       * fixinc/tests/base/internal/sgimacros.h: New file.
+
+       * fixinc/inclhack.def (irix_wcsftime): Use XPG5 variant for C99.
+       * fixinc/fixincl.x: Regenerate.
+       * fixinc/tests/base/internal/wchar_core.h: New file.
+
 2003-03-26  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        PR target/7784
index 4b9771a52a828f3fce0bc7ff7e891187f3fb6f8d..58d906ff58545223ce2d4c4d826d69e0662d89b7 100644 (file)
@@ -1,5 +1,6 @@
 /* Definitions of target machine for GNU compiler.  Iris version 6.
-   Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003
+   Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -129,11 +130,12 @@ Boston, MA 02111-1307, USA.  */
    prior to 6.5.  They normally get defined in SUBTARGET_CPP_SPEC if
    !ansi, for g++ we want them regardless.  We don't need this on
    irix6.5 itself, but it shouldn't hurt other than the namespace
-   pollution.  */
+   pollution.  libstdc++ v3 needs many ISO C99 features provided
+   in IRIX 6.5.18, but protected by the __c99 macro.  */
 #undef CPLUSPLUS_CPP_SPEC
 #define CPLUSPLUS_CPP_SPEC "\
 -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS \
-%{ansi:-D__EXTENSIONS__ -D_SGI_SOURCE} %(cpp) \
+%{ansi:-D__EXTENSIONS__ -D_SGI_SOURCE} -D__c99 %(cpp) \
 "
 
 /* Irix 6 uses DWARF-2.  */
index a4ee745dddb664bdbb0d1d68eaf3ba0b72e6cc3d..e59de74fa9bfe2a597a1b57406bbf90f99036f84 100644 (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 148 fixup descriptions.
+ * This file contains 150 fixup descriptions.
  *
  * See README for more information.
  *
@@ -246,6 +246,38 @@ static const char* apzAab_Fd_Zero_Selectbits_HPatch[] = {
 #endif /* _SELECTBITS_H_WRAPPER */\n",
     (char*)NULL };
 
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ *  Description of Aab_Solaris_Sys_Varargs_H fix
+ */
+tSCC zAab_Solaris_Sys_Varargs_HName[] =
+     "AAB_solaris_sys_varargs_h";
+
+/*
+ *  File name selection pattern
+ */
+tSCC zAab_Solaris_Sys_Varargs_HList[] =
+  "|sys/varargs.h|";
+/*
+ *  Machine/OS name selection pattern
+ */
+tSCC* apzAab_Solaris_Sys_Varargs_HMachs[] = {
+        "*-*-solaris*",
+        (const char*)NULL };
+#define AAB_SOLARIS_SYS_VARARGS_H_TEST_CT  0
+#define aAab_Solaris_Sys_Varargs_HTests   (tTestDesc*)NULL
+
+/*
+ *  Fix Command Arguments for Aab_Solaris_Sys_Varargs_H
+ */
+static const char* apzAab_Solaris_Sys_Varargs_HPatch[] = {
+"#ifdef __STDC__\n\
+#include <stdarg.h>\n\
+#else\n\
+#include <varargs.h>\n\
+#endif\n",
+    (char*)NULL };
+
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
  *  Description of Aab_Sun_Memcpy fix
@@ -295,38 +327,6 @@ extern int memcmp();\n\n\
 #endif /* __memory_h__ */\n",
     (char*)NULL };
 
-/* * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- *  Description of Aab_Solaris_Sys_Varargs_H fix
- */
-tSCC zAab_Solaris_Sys_Varargs_HName[] =
-     "AAB_solaris_sys_varargs_h";
-
-/*
- *  File name selection pattern
- */
-tSCC zAab_Solaris_Sys_Varargs_HList[] =
-  "|sys/varargs.h|";
-/*
- *  Machine/OS name selection pattern
- */
-tSCC* apzAab_Solaris_Sys_Varargs_HMachs[] = {
-        "*-*-solaris*",
-        (const char*)NULL };
-#define AAB_SOLARIS_SYS_VARARGS_H_TEST_CT  0
-#define aAab_Solaris_Sys_Varargs_HTests   (tTestDesc*)NULL
-
-/*
- *  Fix Command Arguments for Aab_Solaris_Sys_Varargs_H
- */
-static const char* apzAab_Solaris_Sys_Varargs_HPatch[] = {
-"#ifdef __STDC__\n\
-#include <stdarg.h>\n\
-#else\n\
-#include <varargs.h>\n\
-#endif\n",
-    (char*)NULL };
-
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
  *  Description of Aab_Svr4_Replace_Byteorder fix
@@ -1905,44 +1905,118 @@ static const char* apzHpux11_Cpp_Pow_InlinePatch[] = {
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
- *  Description of Hpux_Long_Double fix
+ *  Description of Hpux10_Ctype_Declarations1 fix
  */
-tSCC zHpux_Long_DoubleName[] =
-     "hpux_long_double";
+tSCC zHpux10_Ctype_Declarations1Name[] =
+     "hpux10_ctype_declarations1";
 
 /*
  *  File name selection pattern
  */
-tSCC zHpux_Long_DoubleList[] =
-  "|stdlib.h|";
+tSCC zHpux10_Ctype_Declarations1List[] =
+  "|ctype.h|";
 /*
  *  Machine/OS name selection pattern
  */
-#define apzHpux_Long_DoubleMachs (const char**)NULL
+#define apzHpux10_Ctype_Declarations1Machs (const char**)NULL
 
 /*
  *  content selection pattern - do fix if pattern found
  */
-tSCC zHpux_Long_DoubleSelect0[] =
-       "extern[ \t]long_double[ \t]strtold";
+tSCC zHpux10_Ctype_Declarations1Select0[] =
+       "^#[ \t]*define _toupper\\(__c\\)[ \t]*__toupper\\(__c\\)";
 
 /*
  *  content bypass pattern - skip fix if pattern found
  */
-tSCC zHpux_Long_DoubleBypass0[] =
-       "long_double_t";
+tSCC zHpux10_Ctype_Declarations1Bypass0[] =
+       "^[ \t]*extern[ \t]*int[ \t]*__tolower[ \t]*\\(";
 
-#define    HPUX_LONG_DOUBLE_TEST_CT  2
-static tTestDesc aHpux_Long_DoubleTests[] = {
-  { TT_NEGREP,   zHpux_Long_DoubleBypass0, (regex_t*)NULL },
-  { TT_EGREP,    zHpux_Long_DoubleSelect0, (regex_t*)NULL }, };
+#define    HPUX10_CTYPE_DECLARATIONS1_TEST_CT  2
+static tTestDesc aHpux10_Ctype_Declarations1Tests[] = {
+  { TT_NEGREP,   zHpux10_Ctype_Declarations1Bypass0, (regex_t*)NULL },
+  { TT_EGREP,    zHpux10_Ctype_Declarations1Select0, (regex_t*)NULL }, };
 
 /*
- *  Fix Command Arguments for Hpux_Long_Double
+ *  Fix Command Arguments for Hpux10_Ctype_Declarations1
  */
-static const char* apzHpux_Long_DoublePatch[] = { "sed",
-    "-e", "/^#[ \t]*ifndef _LONG_DOUBLE/,/\\/\\* _LONG_DOUBLE \\*\\//D",
-    "-e", "s/long_double/long double/g",
+static const char* apzHpux10_Ctype_Declarations1Patch[] = {
+    "format",
+    "#ifdef _PROTOTYPES\n\
+extern int __tolower(int);\n\
+extern int __toupper(int);\n\
+#else /* NOT _PROTOTYPES */\n\
+extern int __tolower();\n\
+extern int __toupper();\n\
+#endif /* _PROTOTYPES */\n\n\
+%0\n",
+    (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ *  Description of Hpux10_Ctype_Declarations2 fix
+ */
+tSCC zHpux10_Ctype_Declarations2Name[] =
+     "hpux10_ctype_declarations2";
+
+/*
+ *  File name selection pattern
+ */
+tSCC zHpux10_Ctype_Declarations2List[] =
+  "|ctype.h|";
+/*
+ *  Machine/OS name selection pattern
+ */
+#define apzHpux10_Ctype_Declarations2Machs (const char**)NULL
+
+/*
+ *  content selection pattern - do fix if pattern found
+ */
+tSCC zHpux10_Ctype_Declarations2Select0[] =
+       "^#  if defined\\(_SB_CTYPE_MACROS\\) && \\!defined\\(__lint\\)";
+
+/*
+ *  content bypass pattern - skip fix if pattern found
+ */
+tSCC zHpux10_Ctype_Declarations2Bypass0[] =
+       "^[ \t]*extern[ \t]*int[ \t]*_isalnum[ \t]*\\(";
+
+#define    HPUX10_CTYPE_DECLARATIONS2_TEST_CT  2
+static tTestDesc aHpux10_Ctype_Declarations2Tests[] = {
+  { TT_NEGREP,   zHpux10_Ctype_Declarations2Bypass0, (regex_t*)NULL },
+  { TT_EGREP,    zHpux10_Ctype_Declarations2Select0, (regex_t*)NULL }, };
+
+/*
+ *  Fix Command Arguments for Hpux10_Ctype_Declarations2
+ */
+static const char* apzHpux10_Ctype_Declarations2Patch[] = {
+    "format",
+    "%0\n\n\
+#ifdef _PROTOTYPES\n\
+     extern int _isalnum(int);\n\
+     extern int _isalpha(int);\n\
+     extern int _iscntrl(int);\n\
+     extern int _isdigit(int);\n\
+     extern int _isgraph(int);\n\
+     extern int _islower(int);\n\
+     extern int _isprint(int);\n\
+     extern int _ispunct(int);\n\
+     extern int _isspace(int);\n\
+     extern int _isupper(int);\n\
+     extern int _isxdigit(int);\n\
+#  else /* not _PROTOTYPES */\n\
+     extern int _isalnum();\n\
+     extern int _isalpha();\n\
+     extern int _iscntrl();\n\
+     extern int _isdigit();\n\
+     extern int _isgraph();\n\
+     extern int _islower();\n\
+     extern int _isprint();\n\
+     extern int _ispunct();\n\
+     extern int _isspace();\n\
+     extern int _isupper();\n\
+     extern int _isxdigit();\n\
+#endif /* _PROTOTYPES */\n",
     (char*)NULL };
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -2062,118 +2136,74 @@ static const char* apzHpux11_Uint32_CPatch[] = {
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
- *  Description of Hpux10_Ctype_Declarations1 fix
+ *  Description of Hpux11_Vsnprintf fix
  */
-tSCC zHpux10_Ctype_Declarations1Name[] =
-     "hpux10_ctype_declarations1";
+tSCC zHpux11_VsnprintfName[] =
+     "hpux11_vsnprintf";
 
 /*
  *  File name selection pattern
  */
-tSCC zHpux10_Ctype_Declarations1List[] =
-  "|ctype.h|";
+tSCC zHpux11_VsnprintfList[] =
+  "|stdio.h|";
 /*
  *  Machine/OS name selection pattern
  */
-#define apzHpux10_Ctype_Declarations1Machs (const char**)NULL
+#define apzHpux11_VsnprintfMachs (const char**)NULL
 
 /*
  *  content selection pattern - do fix if pattern found
  */
-tSCC zHpux10_Ctype_Declarations1Select0[] =
-       "^#[ \t]*define _toupper\\(__c\\)[ \t]*__toupper\\(__c\\)";
-
-/*
- *  content bypass pattern - skip fix if pattern found
- */
-tSCC zHpux10_Ctype_Declarations1Bypass0[] =
-       "^[ \t]*extern[ \t]*int[ \t]*__tolower[ \t]*\\(";
+tSCC zHpux11_VsnprintfSelect0[] =
+       "(extern int vsnprintf\\(char \\*, _[hpux]*_size_t, const char \\*,) __va__list\\);";
 
-#define    HPUX10_CTYPE_DECLARATIONS1_TEST_CT  2
-static tTestDesc aHpux10_Ctype_Declarations1Tests[] = {
-  { TT_NEGREP,   zHpux10_Ctype_Declarations1Bypass0, (regex_t*)NULL },
-  { TT_EGREP,    zHpux10_Ctype_Declarations1Select0, (regex_t*)NULL }, };
+#define    HPUX11_VSNPRINTF_TEST_CT  1
+static tTestDesc aHpux11_VsnprintfTests[] = {
+  { TT_EGREP,    zHpux11_VsnprintfSelect0, (regex_t*)NULL }, };
 
 /*
- *  Fix Command Arguments for Hpux10_Ctype_Declarations1
+ *  Fix Command Arguments for Hpux11_Vsnprintf
  */
-static const char* apzHpux10_Ctype_Declarations1Patch[] = {
+static const char* apzHpux11_VsnprintfPatch[] = {
     "format",
-    "#ifdef _PROTOTYPES\n\
-extern int __tolower(int);\n\
-extern int __toupper(int);\n\
-#else /* NOT _PROTOTYPES */\n\
-extern int __tolower();\n\
-extern int __toupper();\n\
-#endif /* _PROTOTYPES */\n\n\
-%0\n",
+    "%1 __va_list);",
     (char*)NULL };
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
- *  Description of Hpux10_Ctype_Declarations2 fix
+ *  Description of Hpux8_Bogus_Inlines fix
  */
-tSCC zHpux10_Ctype_Declarations2Name[] =
-     "hpux10_ctype_declarations2";
+tSCC zHpux8_Bogus_InlinesName[] =
+     "hpux8_bogus_inlines";
 
 /*
  *  File name selection pattern
  */
-tSCC zHpux10_Ctype_Declarations2List[] =
-  "|ctype.h|";
+tSCC zHpux8_Bogus_InlinesList[] =
+  "|math.h|";
 /*
  *  Machine/OS name selection pattern
  */
-#define apzHpux10_Ctype_Declarations2Machs (const char**)NULL
+#define apzHpux8_Bogus_InlinesMachs (const char**)NULL
 
 /*
  *  content selection pattern - do fix if pattern found
  */
-tSCC zHpux10_Ctype_Declarations2Select0[] =
-       "^#  if defined\\(_SB_CTYPE_MACROS\\) && \\!defined\\(__lint\\)";
-
-/*
- *  content bypass pattern - skip fix if pattern found
- */
-tSCC zHpux10_Ctype_Declarations2Bypass0[] =
-       "^[ \t]*extern[ \t]*int[ \t]*_isalnum[ \t]*\\(";
+tSCC zHpux8_Bogus_InlinesSelect0[] =
+       "inline";
 
-#define    HPUX10_CTYPE_DECLARATIONS2_TEST_CT  2
-static tTestDesc aHpux10_Ctype_Declarations2Tests[] = {
-  { TT_NEGREP,   zHpux10_Ctype_Declarations2Bypass0, (regex_t*)NULL },
-  { TT_EGREP,    zHpux10_Ctype_Declarations2Select0, (regex_t*)NULL }, };
+#define    HPUX8_BOGUS_INLINES_TEST_CT  1
+static tTestDesc aHpux8_Bogus_InlinesTests[] = {
+  { TT_EGREP,    zHpux8_Bogus_InlinesSelect0, (regex_t*)NULL }, };
 
 /*
- *  Fix Command Arguments for Hpux10_Ctype_Declarations2
+ *  Fix Command Arguments for Hpux8_Bogus_Inlines
  */
-static const char* apzHpux10_Ctype_Declarations2Patch[] = {
-    "format",
-    "%0\n\n\
-#ifdef _PROTOTYPES\n\
-     extern int _isalnum(int);\n\
-     extern int _isalpha(int);\n\
-     extern int _iscntrl(int);\n\
-     extern int _isdigit(int);\n\
-     extern int _isgraph(int);\n\
-     extern int _islower(int);\n\
-     extern int _isprint(int);\n\
-     extern int _ispunct(int);\n\
-     extern int _isspace(int);\n\
-     extern int _isupper(int);\n\
-     extern int _isxdigit(int);\n\
-#  else /* not _PROTOTYPES */\n\
-     extern int _isalnum();\n\
-     extern int _isalpha();\n\
-     extern int _iscntrl();\n\
-     extern int _isdigit();\n\
-     extern int _isgraph();\n\
-     extern int _islower();\n\
-     extern int _isprint();\n\
-     extern int _ispunct();\n\
-     extern int _isspace();\n\
-     extern int _isupper();\n\
-     extern int _isxdigit();\n\
-#endif /* _PROTOTYPES */\n",
+static const char* apzHpux8_Bogus_InlinesPatch[] = { "sed",
+    "-e", "s@inline int abs(int [a-z][a-z]*) {.*}@extern \"C\" int abs(int);@",
+    "-e", "s@inline double abs(double [a-z][a-z]*) {.*}@@",
+    "-e", "s@inline int sqr(int [a-z][a-z]*) {.*}@@",
+    "-e", "s@inline double sqr(double [a-z][a-z]*) {.*}@@",
     (char*)NULL };
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -2213,74 +2243,44 @@ static const char* apzHpux_Ctype_MacrosPatch[] = {
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
- *  Description of Hpux11_Vsnprintf fix
+ *  Description of Hpux_Long_Double fix
  */
-tSCC zHpux11_VsnprintfName[] =
-     "hpux11_vsnprintf";
+tSCC zHpux_Long_DoubleName[] =
+     "hpux_long_double";
 
 /*
  *  File name selection pattern
  */
-tSCC zHpux11_VsnprintfList[] =
-  "|stdio.h|";
+tSCC zHpux_Long_DoubleList[] =
+  "|stdlib.h|";
 /*
  *  Machine/OS name selection pattern
  */
-#define apzHpux11_VsnprintfMachs (const char**)NULL
+#define apzHpux_Long_DoubleMachs (const char**)NULL
 
 /*
  *  content selection pattern - do fix if pattern found
  */
-tSCC zHpux11_VsnprintfSelect0[] =
-       "(extern int vsnprintf\\(char \\*, _[hpux]*_size_t, const char \\*,) __va__list\\);";
-
-#define    HPUX11_VSNPRINTF_TEST_CT  1
-static tTestDesc aHpux11_VsnprintfTests[] = {
-  { TT_EGREP,    zHpux11_VsnprintfSelect0, (regex_t*)NULL }, };
-
-/*
- *  Fix Command Arguments for Hpux11_Vsnprintf
- */
-static const char* apzHpux11_VsnprintfPatch[] = {
-    "format",
-    "%1 __va_list);",
-    (char*)NULL };
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- *  Description of Hpux8_Bogus_Inlines fix
- */
-tSCC zHpux8_Bogus_InlinesName[] =
-     "hpux8_bogus_inlines";
-
-/*
- *  File name selection pattern
- */
-tSCC zHpux8_Bogus_InlinesList[] =
-  "|math.h|";
-/*
- *  Machine/OS name selection pattern
- */
-#define apzHpux8_Bogus_InlinesMachs (const char**)NULL
+tSCC zHpux_Long_DoubleSelect0[] =
+       "extern[ \t]long_double[ \t]strtold";
 
 /*
- *  content selection pattern - do fix if pattern found
+ *  content bypass pattern - skip fix if pattern found
  */
-tSCC zHpux8_Bogus_InlinesSelect0[] =
-       "inline";
+tSCC zHpux_Long_DoubleBypass0[] =
+       "long_double_t";
 
-#define    HPUX8_BOGUS_INLINES_TEST_CT  1
-static tTestDesc aHpux8_Bogus_InlinesTests[] = {
-  { TT_EGREP,    zHpux8_Bogus_InlinesSelect0, (regex_t*)NULL }, };
+#define    HPUX_LONG_DOUBLE_TEST_CT  2
+static tTestDesc aHpux_Long_DoubleTests[] = {
+  { TT_NEGREP,   zHpux_Long_DoubleBypass0, (regex_t*)NULL },
+  { TT_EGREP,    zHpux_Long_DoubleSelect0, (regex_t*)NULL }, };
 
 /*
- *  Fix Command Arguments for Hpux8_Bogus_Inlines
+ *  Fix Command Arguments for Hpux_Long_Double
  */
-static const char* apzHpux8_Bogus_InlinesPatch[] = { "sed",
-    "-e", "s@inline int abs(int [a-z][a-z]*) {.*}@extern \"C\" int abs(int);@",
-    "-e", "s@inline double abs(double [a-z][a-z]*) {.*}@@",
-    "-e", "s@inline int sqr(int [a-z][a-z]*) {.*}@@",
-    "-e", "s@inline double sqr(double [a-z][a-z]*) {.*}@@",
+static const char* apzHpux_Long_DoublePatch[] = { "sed",
+    "-e", "/^#[ \t]*ifndef _LONG_DOUBLE/,/\\/\\* _LONG_DOUBLE \\*\\//D",
+    "-e", "s/long_double/long double/g",
     (char*)NULL };
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -2578,6 +2578,46 @@ static const char* apzIrix_Limits_ConstPatch[] = {
     "extern __const ",
     (char*)NULL };
 
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ *  Description of Irix___Restrict fix
+ */
+tSCC zIrix___RestrictName[] =
+     "irix___restrict";
+
+/*
+ *  File name selection pattern
+ */
+tSCC zIrix___RestrictList[] =
+  "|internal/sgimacros.h|";
+/*
+ *  Machine/OS name selection pattern
+ */
+tSCC* apzIrix___RestrictMachs[] = {
+        "mips-sgi-irix6.5",
+        (const char*)NULL };
+
+/*
+ *  content selection pattern - do fix if pattern found
+ */
+tSCC zIrix___RestrictSelect0[] =
+       "(#ifdef __c99\n\
+)(#[ \t]*define __restrict restrict)";
+
+#define    IRIX___RESTRICT_TEST_CT  1
+static tTestDesc aIrix___RestrictTests[] = {
+  { TT_EGREP,    zIrix___RestrictSelect0, (regex_t*)NULL }, };
+
+/*
+ *  Fix Command Arguments for Irix___Restrict
+ */
+static const char* apzIrix___RestrictPatch[] = {
+    "format",
+    "%1#  ifndef __cplusplus\n\
+%2\n\
+#  endif",
+    (char*)NULL };
+
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
  *  Description of Irix_Socklen_T fix
@@ -2655,6 +2695,45 @@ static const char* apzIrix_Stdio_Va_ListPatch[] = {
     "%1, __gnuc_va_list",
     (char*)NULL };
 
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ *  Description of Irix_Wcsftime fix
+ */
+tSCC zIrix_WcsftimeName[] =
+     "irix_wcsftime";
+
+/*
+ *  File name selection pattern
+ */
+tSCC zIrix_WcsftimeList[] =
+  "|internal/wchar_core.h|";
+/*
+ *  Machine/OS name selection pattern
+ */
+tSCC* apzIrix_WcsftimeMachs[] = {
+        "mips-sgi-irix6.5",
+        (const char*)NULL };
+
+/*
+ *  content selection pattern - do fix if pattern found
+ */
+tSCC zIrix_WcsftimeSelect0[] =
+       "#if _NO_XOPEN5\n\
+(extern size_t[ \t]+wcsftime.*const char *.*)";
+
+#define    IRIX_WCSFTIME_TEST_CT  1
+static tTestDesc aIrix_WcsftimeTests[] = {
+  { TT_EGREP,    zIrix_WcsftimeSelect0, (regex_t*)NULL }, };
+
+/*
+ *  Fix Command Arguments for Irix_Wcsftime
+ */
+static const char* apzIrix_WcsftimePatch[] = {
+    "format",
+    "#if _NO_XOPEN5 && !defined(__c99)\n\
+%1",
+    (char*)NULL };
+
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
  *  Description of Isc_Fmod fix
@@ -5853,9 +5932,9 @@ static const char* apzX11_SprintfPatch[] = {
  *
  *  List of all fixes
  */
-#define REGEX_COUNT          160
+#define REGEX_COUNT          162
 #define MACH_LIST_SIZE_LIMIT 279
-#define FIX_COUNT            148
+#define FIX_COUNT            150
 
 /*
  *  Enumerate the fixes
@@ -5865,8 +5944,8 @@ typedef enum {
     AAB_FD_ZERO_ASM_POSIX_TYPES_H_FIXIDX,
     AAB_FD_ZERO_GNU_TYPES_H_FIXIDX,
     AAB_FD_ZERO_SELECTBITS_H_FIXIDX,
-    AAB_SUN_MEMCPY_FIXIDX,
     AAB_SOLARIS_SYS_VARARGS_H_FIXIDX,
+    AAB_SUN_MEMCPY_FIXIDX,
     AAB_SVR4_REPLACE_BYTEORDER_FIXIDX,
     AAB_ULTRIX_ANSI_COMPAT_FIXIDX,
     AAB_ULTRIX_LIMITS_FIXIDX,
@@ -5907,15 +5986,15 @@ typedef enum {
     HP_SYSFILE_FIXIDX,
     HPUX10_CPP_POW_INLINE_FIXIDX,
     HPUX11_CPP_POW_INLINE_FIXIDX,
-    HPUX_LONG_DOUBLE_FIXIDX,
+    HPUX10_CTYPE_DECLARATIONS1_FIXIDX,
+    HPUX10_CTYPE_DECLARATIONS2_FIXIDX,
     HPUX11_FABSF_FIXIDX,
     HPUX11_SIZE_T_FIXIDX,
     HPUX11_UINT32_C_FIXIDX,
-    HPUX10_CTYPE_DECLARATIONS1_FIXIDX,
-    HPUX10_CTYPE_DECLARATIONS2_FIXIDX,
-    HPUX_CTYPE_MACROS_FIXIDX,
     HPUX11_VSNPRINTF_FIXIDX,
     HPUX8_BOGUS_INLINES_FIXIDX,
+    HPUX_CTYPE_MACROS_FIXIDX,
+    HPUX_LONG_DOUBLE_FIXIDX,
     HPUX_MAXINT_FIXIDX,
     HPUX_SYSTIME_FIXIDX,
     INT_ABORT_FREE_AND_EXIT_FIXIDX,
@@ -5924,8 +6003,10 @@ typedef enum {
     IP_MISSING_SEMI_FIXIDX,
     IRIX_ASM_APOSTROPHE_FIXIDX,
     IRIX_LIMITS_CONST_FIXIDX,
+    IRIX___RESTRICT_FIXIDX,
     IRIX_SOCKLEN_T_FIXIDX,
     IRIX_STDIO_VA_LIST_FIXIDX,
+    IRIX_WCSFTIME_FIXIDX,
     ISC_FMOD_FIXIDX,
     ISC_OMITS_WITH_STDC_FIXIDX,
     KANDR_CONCAT_FIXIDX,
@@ -6032,16 +6113,16 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
      AAB_FD_ZERO_SELECTBITS_H_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
      aAab_Fd_Zero_Selectbits_HTests,   apzAab_Fd_Zero_Selectbits_HPatch, 0 },
 
-  {  zAab_Sun_MemcpyName,    zAab_Sun_MemcpyList,
-     apzAab_Sun_MemcpyMachs,
-     AAB_SUN_MEMCPY_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
-     aAab_Sun_MemcpyTests,   apzAab_Sun_MemcpyPatch, 0 },
-
   {  zAab_Solaris_Sys_Varargs_HName,    zAab_Solaris_Sys_Varargs_HList,
      apzAab_Solaris_Sys_Varargs_HMachs,
      AAB_SOLARIS_SYS_VARARGS_H_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
      aAab_Solaris_Sys_Varargs_HTests,   apzAab_Solaris_Sys_Varargs_HPatch, 0 },
 
+  {  zAab_Sun_MemcpyName,    zAab_Sun_MemcpyList,
+     apzAab_Sun_MemcpyMachs,
+     AAB_SUN_MEMCPY_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
+     aAab_Sun_MemcpyTests,   apzAab_Sun_MemcpyPatch, 0 },
+
   {  zAab_Svr4_Replace_ByteorderName,    zAab_Svr4_Replace_ByteorderList,
      apzAab_Svr4_Replace_ByteorderMachs,
      AAB_SVR4_REPLACE_BYTEORDER_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
@@ -6242,10 +6323,15 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
      HPUX11_CPP_POW_INLINE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
      aHpux11_Cpp_Pow_InlineTests,   apzHpux11_Cpp_Pow_InlinePatch, 0 },
 
-  {  zHpux_Long_DoubleName,    zHpux_Long_DoubleList,
-     apzHpux_Long_DoubleMachs,
-     HPUX_LONG_DOUBLE_TEST_CT, FD_MACH_ONLY,
-     aHpux_Long_DoubleTests,   apzHpux_Long_DoublePatch, 0 },
+  {  zHpux10_Ctype_Declarations1Name,    zHpux10_Ctype_Declarations1List,
+     apzHpux10_Ctype_Declarations1Machs,
+     HPUX10_CTYPE_DECLARATIONS1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+     aHpux10_Ctype_Declarations1Tests,   apzHpux10_Ctype_Declarations1Patch, 0 },
+
+  {  zHpux10_Ctype_Declarations2Name,    zHpux10_Ctype_Declarations2List,
+     apzHpux10_Ctype_Declarations2Machs,
+     HPUX10_CTYPE_DECLARATIONS2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+     aHpux10_Ctype_Declarations2Tests,   apzHpux10_Ctype_Declarations2Patch, 0 },
 
   {  zHpux11_FabsfName,    zHpux11_FabsfList,
      apzHpux11_FabsfMachs,
@@ -6262,21 +6348,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
      HPUX11_UINT32_C_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
      aHpux11_Uint32_CTests,   apzHpux11_Uint32_CPatch, 0 },
 
-  {  zHpux10_Ctype_Declarations1Name,    zHpux10_Ctype_Declarations1List,
-     apzHpux10_Ctype_Declarations1Machs,
-     HPUX10_CTYPE_DECLARATIONS1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
-     aHpux10_Ctype_Declarations1Tests,   apzHpux10_Ctype_Declarations1Patch, 0 },
-
-  {  zHpux10_Ctype_Declarations2Name,    zHpux10_Ctype_Declarations2List,
-     apzHpux10_Ctype_Declarations2Machs,
-     HPUX10_CTYPE_DECLARATIONS2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
-     aHpux10_Ctype_Declarations2Tests,   apzHpux10_Ctype_Declarations2Patch, 0 },
-
-  {  zHpux_Ctype_MacrosName,    zHpux_Ctype_MacrosList,
-     apzHpux_Ctype_MacrosMachs,
-     HPUX_CTYPE_MACROS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
-     aHpux_Ctype_MacrosTests,   apzHpux_Ctype_MacrosPatch, 0 },
-
   {  zHpux11_VsnprintfName,    zHpux11_VsnprintfList,
      apzHpux11_VsnprintfMachs,
      HPUX11_VSNPRINTF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
@@ -6287,6 +6358,16 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
      HPUX8_BOGUS_INLINES_TEST_CT, FD_MACH_ONLY,
      aHpux8_Bogus_InlinesTests,   apzHpux8_Bogus_InlinesPatch, 0 },
 
+  {  zHpux_Ctype_MacrosName,    zHpux_Ctype_MacrosList,
+     apzHpux_Ctype_MacrosMachs,
+     HPUX_CTYPE_MACROS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+     aHpux_Ctype_MacrosTests,   apzHpux_Ctype_MacrosPatch, 0 },
+
+  {  zHpux_Long_DoubleName,    zHpux_Long_DoubleList,
+     apzHpux_Long_DoubleMachs,
+     HPUX_LONG_DOUBLE_TEST_CT, FD_MACH_ONLY,
+     aHpux_Long_DoubleTests,   apzHpux_Long_DoublePatch, 0 },
+
   {  zHpux_MaxintName,    zHpux_MaxintList,
      apzHpux_MaxintMachs,
      HPUX_MAXINT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
@@ -6327,6 +6408,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
      IRIX_LIMITS_CONST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
      aIrix_Limits_ConstTests,   apzIrix_Limits_ConstPatch, 0 },
 
+  {  zIrix___RestrictName,    zIrix___RestrictList,
+     apzIrix___RestrictMachs,
+     IRIX___RESTRICT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+     aIrix___RestrictTests,   apzIrix___RestrictPatch, 0 },
+
   {  zIrix_Socklen_TName,    zIrix_Socklen_TList,
      apzIrix_Socklen_TMachs,
      IRIX_SOCKLEN_T_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
@@ -6337,6 +6423,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
      IRIX_STDIO_VA_LIST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
      aIrix_Stdio_Va_ListTests,   apzIrix_Stdio_Va_ListPatch, 0 },
 
+  {  zIrix_WcsftimeName,    zIrix_WcsftimeList,
+     apzIrix_WcsftimeMachs,
+     IRIX_WCSFTIME_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+     aIrix_WcsftimeTests,   apzIrix_WcsftimePatch, 0 },
+
   {  zIsc_FmodName,    zIsc_FmodList,
      apzIsc_FmodMachs,
      ISC_FMOD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
index 9d34c0a6e6b12dbb7aee25322df921d4f567ae4d..ad29f465f551791860f8f90894d9a845c9c6cb8d 100644 (file)
@@ -1501,6 +1501,24 @@ fix = {
 };
 
 
+/*
+ *  IRIX 6.5.1[89] <internal/sgimacros.h> unconditionally defines
+ *  __restrict as restrict iff __c99.  This is wrong for C++, which
+ *  needs many C99 features, but only supports __restrict.
+ */
+fix = {
+    hackname  = irix___restrict;
+    files     = internal/sgimacros.h;
+    select    = "(#ifdef __c99\n)(#[ \t]*define __restrict restrict)";
+
+    mach      = "mips-sgi-irix6.5";
+    c_fix     = format;
+    c_fix_arg = "%1"
+               "#  ifndef __cplusplus\n%2\n#  endif";
+
+    test_text = "#ifdef __c99\n#  define __restrict restrict";
+};
+
 /*
  *  IRIX 6.5.1[78] <sys/socket.h> has a broken definition of socklen_t.
  *  Various socket function prototypes use different types instead,
@@ -1541,6 +1559,23 @@ fix = {
 };
 
 
+/*
+ *  IRIX 6.5.19 <internal/wchar_core.h> provides the XPG4 variant of
+ *  wcsftime by default.  ISO C99 requires the XPG5 variant instead.
+ */
+fix = {
+    hackname  = irix_wcsftime;
+    files     = internal/wchar_core.h;
+    select    = "#if _NO_XOPEN5\n(extern size_t[ \t]+wcsftime.*const char \*.*)";
+
+    mach      = "mips-sgi-irix6.5";
+    c_fix     = format;
+    c_fix_arg = "#if _NO_XOPEN5 && !defined(__c99)\n%1";
+
+    test_text = "#if _NO_XOPEN5\n"
+               "extern size_t          wcsftime(wchar_t *, __SGI_LIBC_NAMESPACE_QUALIFIER size_t, const char *, const struct tm *);";
+};
+
 /*
  * Fixing ISC fmod declaration
  */