OSDN Git Service

AAB_solaris_sys_varargs_h was misplaced
[pf3gnuchains/gcc-fork.git] / gcc / fixinc / inclhack.def
index 7b663ef..2fce20f 100644 (file)
@@ -220,6 +220,23 @@ fix = {
 
 
 /*
+ * Solaris <sys/varargs.h> is a DDK (aka kernel-land) header providing
+ * the same interface as <stdarg.h>.  No idea why they couldn't have just
+ * used the standard header.
+ */
+fix = {
+    hackname = AAB_solaris_sys_varargs_h;
+    files    = "sys/varargs.h";
+    mach     = '*-*-solaris*';
+    replace  = "#ifdef __STDC__\n"
+              "#include <stdarg.h>\n"
+              "#else\n"
+              "#include <varargs.h>\n"
+              "#endif\n";
+};
+
+
+/*
  *  Fix non-ANSI memcpy declaration that conflicts with gcc's builtin
  *  declaration on Sun OS 4.x.  We must only fix this on Sun OS 4.x, because
  *  many other systems have similar text but correct versions of the file.
@@ -259,23 +276,6 @@ extern int memcmp();
 
 
 /*
- * Solaris <sys/varargs.h> is a DDK (aka kernel-land) header providing
- * the same interface as <stdarg.h>.  No idea why they couldn't have just
- * used the standard header.
- */
-fix = {
-    hackname = AAB_solaris_sys_varargs_h;
-    files    = "sys/varargs.h";
-    mach     = '*-*-solaris*';
-    replace  = "#ifdef __STDC__\n"
-              "#include <stdarg.h>\n"
-              "#else\n"
-              "#include <varargs.h>\n"
-              "#endif\n";
-};
-
-
-/*
  *  Completely replace <sys/varargs.h> with a file that includes gcc's
  *  stdarg.h or varargs.h files as appropriate.
  */
@@ -2892,13 +2892,14 @@ fix = {
     hackname  = thread_keyword;
     files     = "pthread.h";
     files     = "bits/sigthread.h";
-    select    = " __thread,";
+    select    = "([* ])__thread([,)])";
     c_fix     = format;
-    c_fix_arg = " __thr,";
+    c_fix_arg = "%1__thr%2";
 
     test_text =
        "extern int pthread_create (pthread_t *__restrict __thread,\n"
-       "extern int pthread_kill (pthread_t __thread, int __signo);";
+       "extern int pthread_kill (pthread_t __thread, int __signo);\n"
+       "extern int pthread_cancel (pthread_t __thread);";
 };
 
 /*