summaryrefslogtreecommitdiff
path: root/fixincludes/inclhack.def
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-28 00:45:56 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-28 00:45:56 +0000
commita96763ff13bcc0b3cecee2beacda000818a1f02f (patch)
treef87c109dd8d9657647a201bf9aa0cb1d671b42db /fixincludes/inclhack.def
parentdb91ed9dec9435196e944268e7f83dcf82936f1d (diff)
downloadgcc-a96763ff13bcc0b3cecee2beacda000818a1f02f.tar.gz
* inclhack.def (solaris_once_init_2): New fix.
* tests/base/pthread.h: Update. * fixincl.x: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117265 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r--fixincludes/inclhack.def33
1 files changed, 33 insertions, 0 deletions
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 04e6aa1cc7f..f8d16643b0c 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -3034,6 +3034,39 @@ fix = {
/*
+ * Sun Solaris defines PTHREAD_ONCE_INIT with a "0" for some
+ * fields of the pthread_once_t structure, which are of type
+ * upad64_t, which itself is typedef'd to int64_t, but with __STDC__
+ * defined (e.g. by -ansi) it is a union. So change the initializer
+ * to "{0}" instead. This test relies on solaris_once_init_1.
+ */
+fix = {
+ hackname = solaris_once_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 "match" 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}, {0}, {0}, {%3}%4\n"
+ "#endif";
+ c_fix_arg = "(^#define[ \t]+PTHREAD_ONCE_INIT[ \t]+\\{\\{)"
+ "(0, 0, 0, )(PTHREAD_[A-Z_]+)(\\}\\})[ \t]*$";
+ test_text =
+ '#ident "@(#)pthread.h 1.26 98/04/12 SMI"'"\n"
+ "#define PTHREAD_ONCE_INIT\t{{0, 0, 0, PTHREAD_ONCE_NOTDONE}}\n";
+};
+
+
+/*
* Solaris 2.5.1 and 2.6 use an outdated prototype for send & recv
* in sys/socket.h. This is corrected in Solaris 7 and up.
*/