Commit a77d42cf by Kaveh R. Ghazi Committed by Kaveh Ghazi

inclhack.def (solaris_mutex_init_2): Update for Solaris9.

	* 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
parent 504652cb
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> 2006-09-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* inclhack.def (solaris_once_init_2): New fix. * inclhack.def (solaris_once_init_2): New fix.
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
* *
* DO NOT EDIT THIS FILE (fixincl.x) * 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 * From the definitions inclhack.def
* and the template file fixincl * 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. * You must regenerate it. Use the ./genfixes script.
* *
...@@ -5471,7 +5471,10 @@ tSCC zSolaris_Mutex_Init_2List[] = ...@@ -5471,7 +5471,10 @@ tSCC zSolaris_Mutex_Init_2List[] =
/* /*
* Machine/OS name selection pattern * 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 * content selection pattern - do fix if pattern found
...@@ -5491,9 +5494,10 @@ static const char* apzSolaris_Mutex_Init_2Patch[] = { ...@@ -5491,9 +5494,10 @@ static const char* apzSolaris_Mutex_Init_2Patch[] = {
"#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n\ "#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n\
%0\n\ %0\n\
#else\n\ #else\n\
%1, {0}}%3\n\ %1, {0}}%4\n\
#endif", #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 }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
......
...@@ -2972,18 +2972,31 @@ fix = { ...@@ -2972,18 +2972,31 @@ fix = {
hackname = solaris_mutex_init_2; hackname = solaris_mutex_init_2;
select = '@\(#\)pthread.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI"; select = '@\(#\)pthread.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
files = pthread.h; 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 = format;
c_fix_arg = "#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n" c_fix_arg = "#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n"
"%0\n" "%0\n"
"#else\n" "#else\n"
"%1, {0}}%3\n" "%1, {0}}%4\n"
"#endif"; "#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].*)$"; ",[ \t]*0\\}" "(|[ \t].*)$";
test_text = test_text =
'#ident "@(#)pthread.h 1.26 98/04/12 SMI"'"\n" '#ident "@(#)pthread.h 1.26 98/04/12 SMI"'"\n"
"#define PTHREAD_MUTEX_INITIALIZER\t{{{0},0}, {{{0}}}, 0}\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 = { ...@@ -3047,7 +3060,7 @@ fix = {
/* /*
* On Solaris 10, this fix is unnecessary because upad64_t is * On Solaris 10, this fix is unnecessary because upad64_t is
* always defined correctly regardless of the definition of the * 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 * solaris9. The second "mach" pattern will not match any two (or
* more) digit solaris version, but it will match e.g. 2.5.1. * more) digit solaris version, but it will match e.g. 2.5.1.
*/ */
......
...@@ -94,6 +94,20 @@ extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask); ...@@ -94,6 +94,20 @@ extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask);
#else #else
#define PTHREAD_COND_INITIALIZER {{{0}, 0}, {0}} /* DEFAULTCV */ #define PTHREAD_COND_INITIALIZER {{{0}, 0}, {0}} /* DEFAULTCV */
#endif #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 */ #endif /* SOLARIS_MUTEX_INIT_2_CHECK */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment