diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-29 19:14:58 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-29 19:14:58 +0000 |
commit | b960b7b7bda8f90876d908ff981bef93be473d55 (patch) | |
tree | a90431ae9f443273785d6aa6f3f715b217aa2583 /fixincludes/inclhack.def | |
parent | 68db2e8600d844b081b5c69d6f9577074dbd8223 (diff) | |
download | gcc-b960b7b7bda8f90876d908ff981bef93be473d55.tar.gz |
* 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/inclhack.def')
-rw-r--r-- | fixincludes/inclhack.def | 21 |
1 files changed, 17 insertions, 4 deletions
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. */ |