OSDN Git Service

* fixinc/inclhack.def (svr4_sighandler_type): New fix, ported
authorneroden <neroden@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 25 Aug 2003 21:54:14 +0000 (21:54 +0000)
committerneroden <neroden@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 25 Aug 2003 21:54:14 +0000 (21:54 +0000)
from fixinc.svr4.
* fixinc/fixincl.x: Regenerate.
* fixinc/tests/base/sys/signal.h: Regenerate.

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

gcc/ChangeLog
gcc/fixinc/fixincl.x
gcc/fixinc/inclhack.def
gcc/fixinc/tests/base/sys/signal.h

index e23a0e2..a30a9ec 100644 (file)
@@ -1,3 +1,10 @@
+2003-08-25  Nathanael Nerode  <neroden@twcny.rr.com>
+
+       * fixinc/inclhack.def (svr4_sighandler_type): New fix, ported
+       from fixinc.svr4.
+       * fixinc/fixincl.x: Regenerate.
+       * fixinc/tests/base/sys/signal.h: Regenerate.
+
 2003-08-25  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * combine.c (simplify_comparison): Re-enable widening of comparisons
index 5b689df..c8ac74a 100644 (file)
@@ -2,11 +2,11 @@
  * 
  * DO NOT EDIT THIS FILE   (fixincl.x)
  * 
- * It has been AutoGen-ed  Sunday August 17, 2003 at 01:31:26 AM EDT
+ * It has been AutoGen-ed  Sunday August 24, 2003 at 03:26:44 PM EDT
  * From the definitions    inclhack.def
  * and the template file   fixincl
  */
-/* DO NOT CVS-MERGE THIS FILE, EITHER Sun Aug 17 01:31:26 EDT 2003
+/* DO NOT CVS-MERGE THIS FILE, EITHER Sun Aug 24 15:26:44 EDT 2003
  *
  * You must regenerate it.  Use the ./genfixes script.
  *
@@ -15,7 +15,7 @@
  * certain ANSI-incompatible system header files which are fixed to work
  * correctly with ANSI C and placed in a directory that GNU C will search.
  *
- * This file contains 157 fixup descriptions.
+ * This file contains 158 fixup descriptions.
  *
  * See README for more information.
  *
@@ -4982,6 +4982,41 @@ static const char* apzSvr4_ProfilPatch[] = {
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
+ *  Description of Svr4_Sighandler_Type fix
+ */
+tSCC zSvr4_Sighandler_TypeName[] =
+     "svr4_sighandler_type";
+
+/*
+ *  File name selection pattern
+ */
+tSCC zSvr4_Sighandler_TypeList[] =
+  "|sys/signal.h|";
+/*
+ *  Machine/OS name selection pattern
+ */
+#define apzSvr4_Sighandler_TypeMachs (const char**)NULL
+
+/*
+ *  content selection pattern - do fix if pattern found
+ */
+tSCC zSvr4_Sighandler_TypeSelect0[] =
+       "void *\\(\\*\\)\\(\\)";
+
+#define    SVR4_SIGHANDLER_TYPE_TEST_CT  1
+static tTestDesc aSvr4_Sighandler_TypeTests[] = {
+  { TT_EGREP,    zSvr4_Sighandler_TypeSelect0, (regex_t*)NULL }, };
+
+/*
+ *  Fix Command Arguments for Svr4_Sighandler_Type
+ */
+static const char* apzSvr4_Sighandler_TypePatch[] = {
+    "format",
+    "void (*)(int)",
+    (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
  *  Description of Svr4_Undeclared_Getrnge fix
  */
 tSCC zSvr4_Undeclared_GetrngeName[] =
@@ -6236,9 +6271,9 @@ static const char* apzX11_SprintfPatch[] = {
  *
  *  List of all fixes
  */
-#define REGEX_COUNT          177
+#define REGEX_COUNT          178
 #define MACH_LIST_SIZE_LIMIT 261
-#define FIX_COUNT            157
+#define FIX_COUNT            158
 
 /*
  *  Enumerate the fixes
@@ -6368,6 +6403,7 @@ typedef enum {
     SVR4_GETCWD_FIXIDX,
     SVR4_KRNL_FIXIDX,
     SVR4_PROFIL_FIXIDX,
+    SVR4_SIGHANDLER_TYPE_FIXIDX,
     SVR4_UNDECLARED_GETRNGE_FIXIDX,
     SYSV68_STRING_FIXIDX,
     SYSZ_STDLIB_FOR_SUN_FIXIDX,
@@ -7024,6 +7060,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
      SVR4_PROFIL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
      aSvr4_ProfilTests,   apzSvr4_ProfilPatch, 0 },
 
+  {  zSvr4_Sighandler_TypeName,    zSvr4_Sighandler_TypeList,
+     apzSvr4_Sighandler_TypeMachs,
+     SVR4_SIGHANDLER_TYPE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+     aSvr4_Sighandler_TypeTests,   apzSvr4_Sighandler_TypePatch, 0 },
+
   {  zSvr4_Undeclared_GetrngeName,    zSvr4_Undeclared_GetrngeList,
      apzSvr4_Undeclared_GetrngeMachs,
      SVR4_UNDECLARED_GETRNGE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
index 8dd5f1c..4eade8c 100644 (file)
@@ -2978,6 +2978,22 @@ fix = {
 };
 #endif
 
+
+/*
+ * Correct types for signal handler constants like SIG_DFL; they might be
+ * void (*) (), and should be void (*) (int).  C++ doesn't like the
+ * old style.
+ */
+fix = {
+    hackname = svr4_sighandler_type;
+    files = sys/signal.h;
+    select = 'void *\(\*\)\(\)';
+    c_fix = format;
+    c_fix_arg = "void (*)(int)";
+    test_text = "#define SIG_DFL (void(*)())0\n"
+                "#define SIG_IGN (void (*)())0\n";
+};
+
 /*
  *  Put storage class at start of decl, to avoid warning.
  */
index 9e4fdb8..7a9ecb1 100644 (file)
@@ -21,3 +21,10 @@ void (*signal(...))(...);
 void   (*signal())();
 #endif
 #endif  /* SUN_SIGNAL_CHECK */
+
+
+#if defined( SVR4_SIGHANDLER_TYPE_CHECK )
+#define SIG_DFL (void (*)(int))0
+#define SIG_IGN (void (*)(int))0
+
+#endif  /* SVR4_SIGHANDLER_TYPE_CHECK */