inclhack.def (solaris_mutex_init_2): Update for Solaris9.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Fri, 29 Sep 2006 19:14:58 +0000 (19:14 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Fri, 29 Sep 2006 19:14:58 +0000 (19:14 +0000)
* inclhack.def (solaris_mutex_init_2): Update for Solaris9.
Prevent it from running on solaris10 or later.
(solaris_once_init_2): Fix comment.
* tests/base/pthread.h: Update.

* fixincl.x: Regenerate.

From-SVN: r117310

fixincludes/ChangeLog
fixincludes/fixincl.x
fixincludes/inclhack.def
fixincludes/tests/base/pthread.h

index a0af51ceab247b8f56e55401e66913c73759f8e0..9bfa5a5e05513ae90db71a1b68c2ab953131516b 100644 (file)
@@ -1,3 +1,12 @@
+2006-09-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * inclhack.def (solaris_mutex_init_2): Update for Solaris9.
+       Prevent it from running on solaris10 or later.
+       (solaris_once_init_2): Fix comment.
+       * tests/base/pthread.h: Update.
+
+       * fixincl.x: Regenerate.
+
 2006-09-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * inclhack.def (solaris_once_init_2): New fix.
index 742897e0be69bc27a897cb38ad220524f3dcd1e7..e9c8b882b58ad3063881c71869120c36207b0545 100644 (file)
@@ -2,11 +2,11 @@
  * 
  * DO NOT EDIT THIS FILE   (fixincl.x)
  * 
- * It has been AutoGen-ed  Wednesday September 27, 2006 at 08:16:42 PM EDT
+ * It has been AutoGen-ed  Thursday September 28, 2006 at 11:06:33 PM EDT
  * From the definitions    inclhack.def
  * and the template file   fixincl
  */
-/* DO NOT CVS-MERGE THIS FILE, EITHER Wed Sep 27 20:16:42 EDT 2006
+/* DO NOT CVS-MERGE THIS FILE, EITHER Thu Sep 28 23:06:33 EDT 2006
  *
  * You must regenerate it.  Use the ./genfixes script.
  *
@@ -5471,7 +5471,10 @@ tSCC zSolaris_Mutex_Init_2List[] =
 /*
  *  Machine/OS name selection pattern
  */
-#define apzSolaris_Mutex_Init_2Machs (const char**)NULL
+tSCC* apzSolaris_Mutex_Init_2Machs[] = {
+        "*-*-solaris2.[0-9]",
+        "*-*-solaris2.[0-9][!0-9]*",
+        (const char*)NULL };
 
 /*
  *  content selection pattern - do fix if pattern found
@@ -5491,9 +5494,10 @@ static const char* apzSolaris_Mutex_Init_2Patch[] = {
     "#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n\
 %0\n\
 #else\n\
-%1, {0}}%3\n\
+%1, {0}}%4\n\
 #endif",
-    "(^#define[ \t]+PTHREAD_(MUTEX|COND)_INITIALIZER[ \t]+\\{.*),[ \t]*0\\}(|[ \t].*)$",
+    "(^#define[ \t]+PTHREAD_(MUTEX|COND)_INITIALIZER[ \t]+(|/*.**/[ \t]*\\\\\n\
+[ \t]*)\\{.*),[ \t]*0\\}(|[ \t].*)$",
     (char*)NULL };
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
index f8d16643b0cfcd61c89b7de9f6cbaecdabf51f30..acef2588c85ad9d092a91a26378623fe79816231 100644 (file)
@@ -2972,18 +2972,31 @@ fix = {
     hackname = solaris_mutex_init_2;
     select = '@\(#\)pthread.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
     files = pthread.h;
+    /*
+     * On Solaris 10, this fix is unnecessary because upad64_t is
+     * always defined correctly regardless of the definition of the
+     * __STDC__ macro.  The first "mach" pattern matches up to
+     * solaris9.  The second "mach" pattern will not match any two (or
+     * more) digit solaris version, but it will match e.g. 2.5.1.
+     */
+    mach = '*-*-solaris2.[0-9]', '*-*-solaris2.[0-9][!0-9]*';
     c_fix = format;
     c_fix_arg = "#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n"
                 "%0\n"
                 "#else\n"
-                "%1, {0}}%3\n"
+                "%1, {0}}%4\n"
                 "#endif";
-    c_fix_arg = "(^#define[ \t]+PTHREAD_(MUTEX|COND)_INITIALIZER[ \t]+\\{.*)"
+    c_fix_arg = "(^#define[ \t]+PTHREAD_(MUTEX|COND)_INITIALIZER[ \t]+"
+                "(|/\*.*\*/[ \t]*\\\\\n[ \t]*)\\{.*)"
                 ",[ \t]*0\\}" "(|[ \t].*)$";
     test_text =
     '#ident "@(#)pthread.h  1.26  98/04/12 SMI"'"\n"
     "#define PTHREAD_MUTEX_INITIALIZER\t{{{0},0}, {{{0}}}, 0}\n"
-    "#define PTHREAD_COND_INITIALIZER\t{{{0}, 0}, 0}\t/* DEFAULTCV */";
+    "#define PTHREAD_COND_INITIALIZER\t{{{0}, 0}, 0}\t/* DEFAULTCV */\n"
+    "#define   PTHREAD_MUTEX_INITIALIZER               /* = DEFAULTMUTEX */    \\\\\n"
+    "  {{0, 0, 0, DEFAULT_TYPE, _MUTEX_MAGIC}, {{{0}}}, 0}\n"
+    "#define   PTHREAD_COND_INITIALIZER                /* = DEFAULTCV */       \\\\\n"
+    "  {{{0, 0, 0, 0}, DEFAULT_TYPE, _COND_MAGIC}, 0}";
 };
 
 
@@ -3047,7 +3060,7 @@ fix = {
     /*
      * On Solaris 10, this fix is unnecessary because upad64_t is
      * always defined correctly regardless of the definition of the
-     * __STDC__ macro.  The first "match" pattern matches up to
+     * __STDC__ macro.  The first "mach" pattern matches up to
      * solaris9.  The second "mach" pattern will not match any two (or
      * more) digit solaris version, but it will match e.g. 2.5.1.
      */
index 5f6adf3b23b6d5a82260b461c67fabdc62a12548..b8366bfe51f2925d623a31ecfc61b96fc2ba2268 100644 (file)
@@ -94,6 +94,20 @@ extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask);
 #else
 #define PTHREAD_COND_INITIALIZER       {{{0}, 0}, {0}} /* DEFAULTCV */
 #endif
+#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)
+#define        PTHREAD_MUTEX_INITIALIZER               /* = DEFAULTMUTEX */    \
+       {{0, 0, 0, DEFAULT_TYPE, _MUTEX_MAGIC}, {{{0}}}, 0}
+#else
+#define        PTHREAD_MUTEX_INITIALIZER               /* = DEFAULTMUTEX */    \
+       {{0, 0, 0, DEFAULT_TYPE, _MUTEX_MAGIC}, {{{0}}}, {0}}
+#endif
+#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)
+#define        PTHREAD_COND_INITIALIZER                /* = DEFAULTCV */       \
+       {{{0, 0, 0, 0}, DEFAULT_TYPE, _COND_MAGIC}, 0}
+#else
+#define        PTHREAD_COND_INITIALIZER                /* = DEFAULTCV */       \
+       {{{0, 0, 0, 0}, DEFAULT_TYPE, _COND_MAGIC}, {0}}
+#endif
 #endif  /* SOLARIS_MUTEX_INIT_2_CHECK */