aboutsummaryrefslogtreecommitdiff
path: root/fixincludes
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-29 19:14:58 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-29 19:14:58 +0000
commitb960b7b7bda8f90876d908ff981bef93be473d55 (patch)
treea90431ae9f443273785d6aa6f3f715b217aa2583 /fixincludes
parent68db2e8600d844b081b5c69d6f9577074dbd8223 (diff)
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117310 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'fixincludes')
-rw-r--r--fixincludes/ChangeLog9
-rw-r--r--fixincludes/fixincl.x14
-rw-r--r--fixincludes/inclhack.def21
-rw-r--r--fixincludes/tests/base/pthread.h14
4 files changed, 49 insertions, 9 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index a0af51ceab2..9bfa5a5e055 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -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.
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index 742897e0be6..e9c8b882b58 100644
--- a/fixincludes/fixincl.x
+++ b/fixincludes/fixincl.x
@@ -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 };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index f8d16643b0c..acef2588c85 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -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.
*/
diff --git a/fixincludes/tests/base/pthread.h b/fixincludes/tests/base/pthread.h
index 5f6adf3b23b..b8366bfe51f 100644
--- a/fixincludes/tests/base/pthread.h
+++ b/fixincludes/tests/base/pthread.h
@@ -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 */