PR target/5996
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 Mar 2002 02:24:52 +0000 (02:24 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 Mar 2002 02:24:52 +0000 (02:24 +0000)
        * fixinc/inclhack.def (solaris_stdio_tag): New.
        * fixinc/fixincl.x: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51158 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/fixinc/fixincl.x
gcc/fixinc/inclhack.def

index 96c4fca..bbdadd7 100644 (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
index 280948d..a128a39 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 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,
index 874f584..6faca9a 100644 (file)
@@ -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