summaryrefslogtreecommitdiff
path: root/fixincludes
diff options
context:
space:
mode:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-12 14:29:50 +0000
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-12 14:29:50 +0000
commitb47eb69a53260df58ad2903b430bc328e77cabca (patch)
tree722bbe688b0ca9ee8e6404f78dd7615d339f5386 /fixincludes
parent8d8c2abc14d7727e10fbe5437134f57ecb54cf72 (diff)
downloadgcc-b47eb69a53260df58ad2903b430bc328e77cabca.tar.gz
* inclhack.def (solaris_cond_init): New fix.
* fixincl.x: Regenerate. * tests/base/pthread.h [SOLARIS_COND_INIT_CHECK]: New test. [SOLARIS_MUTEX_INIT_2_CHECK]: Adapt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162080 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'fixincludes')
-rw-r--r--fixincludes/ChangeLog7
-rw-r--r--fixincludes/fixincl.x54
-rw-r--r--fixincludes/inclhack.def20
-rw-r--r--fixincludes/tests/base/pthread.h14
4 files changed, 88 insertions, 7 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index 11c4e695ea1..942df122fc4 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,10 @@
+2010-07-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * inclhack.def (solaris_cond_init): New fix.
+ * fixincl.x: Regenerate.
+ * tests/base/pthread.h [SOLARIS_COND_INIT_CHECK]: New test.
+ [SOLARIS_MUTEX_INIT_2_CHECK]: Adapt.
+
2010-06-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* inclhack.def (solaris__restrict, solaris_complex_cxx): New fixes
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index 88ad8434020..f1552cc1741 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 Friday May 7, 2010 at 02:41:29 PM MEST
+ * It has been AutoGen-ed Sunday June 27, 2010 at 12:52:26 PM MEST
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT SVN-MERGE THIS FILE, EITHER Fri May 7 14:41:29 MEST 2010
+/* DO NOT SVN-MERGE THIS FILE, EITHER Sun Jun 27 12:52:26 MEST 2010
*
* You must regenerate it. Use the ./genfixes script.
*
@@ -15,7 +15,7 @@
* certain ANSI-incompatible system header files which are fixed to work
* correctly with ANSI C and placed in a directory that GNU C will search.
*
- * This file contains 207 fixup descriptions.
+ * This file contains 208 fixup descriptions.
*
* See README for more information.
*
@@ -6229,6 +6229,44 @@ extern \"C\" {\\\n\
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * Description of Solaris_Cond_Init fix
+ */
+tSCC zSolaris_Cond_InitName[] =
+ "solaris_cond_init";
+
+/*
+ * File name selection pattern
+ */
+tSCC zSolaris_Cond_InitList[] =
+ "pthread.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzSolaris_Cond_InitMachs[] = {
+ "*-*-solaris2.8",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zSolaris_Cond_InitSelect0[] =
+ "@\\(#\\)pthread.h[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
+
+#define SOLARIS_COND_INIT_TEST_CT 1
+static tTestDesc aSolaris_Cond_InitTests[] = {
+ { TT_EGREP, zSolaris_Cond_InitSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Solaris_Cond_Init
+ */
+static const char* apzSolaris_Cond_InitPatch[] = {
+ "format",
+ "%1, 0x4356%2",
+ "^(#define[ \t]+PTHREAD_COND_INITIALIZER[ \t]+\\{.*0)(\\},[ \t]*0\\}.*)$",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
* Description of Solaris_Math_1 fix
*/
tSCC zSolaris_Math_1Name[] =
@@ -8432,9 +8470,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
-#define REGEX_COUNT 246
+#define REGEX_COUNT 247
#define MACH_LIST_SIZE_LIMIT 181
-#define FIX_COUNT 207
+#define FIX_COUNT 208
/*
* Enumerate the fixes
@@ -8593,6 +8631,7 @@ typedef enum {
SOLARIS___RESTRICT_FIXIDX,
SOLARIS_COMPLEX_FIXIDX,
SOLARIS_COMPLEX_CXX_FIXIDX,
+ SOLARIS_COND_INIT_FIXIDX,
SOLARIS_MATH_1_FIXIDX,
SOLARIS_MATH_2_FIXIDX,
SOLARIS_MATH_3_FIXIDX,
@@ -9415,6 +9454,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
SOLARIS_COMPLEX_CXX_TEST_CT, FD_MACH_ONLY,
aSolaris_Complex_CxxTests, apzSolaris_Complex_CxxPatch, 0 },
+ { zSolaris_Cond_InitName, zSolaris_Cond_InitList,
+ apzSolaris_Cond_InitMachs,
+ SOLARIS_COND_INIT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aSolaris_Cond_InitTests, apzSolaris_Cond_InitPatch, 0 },
+
{ zSolaris_Math_1Name, zSolaris_Math_1List,
apzSolaris_Math_1Machs,
SOLARIS_MATH_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 16f36a1e74a..362dc7054c9 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -3307,6 +3307,26 @@ fix = {
/*
+ * Solaris 8 PTHREAD_COND_INITIALIZER lacks the __pthread_cond_magic field.
+ * COND_MAGIC is only defined in <synch.h> and pollutes the namespace, so
+ * use the value literally instead.
+ */
+fix = {
+ hackname = solaris_cond_init;
+ select = '@\(#\)pthread.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
+ files = pthread.h;
+ mach = '*-*-solaris2.8';
+ c_fix = format;
+ c_fix_arg = "%1, 0x4356%2";
+ c_fix_arg = "^(#define[ \t]+PTHREAD_COND_INITIALIZER[ \t]+"
+ "\\{.*0)(\\},[ \t]*0\\}.*)$";
+ test_text =
+ '#pragma ident "@(#)pthread.h 1.29 01/07/07 SMI"'"\n"
+ '#define PTHREAD_COND_INITIALIZER {{{0}, 0}, 0} /* = DEFAULTCV */';
+};
+
+
+/*
* Sun Solaris 10 defines several C99 math macros in terms of
* builtins specific to the Studio compiler, in particular not
* compatible with the GNU compiler.
diff --git a/fixincludes/tests/base/pthread.h b/fixincludes/tests/base/pthread.h
index 069a22bb48b..f08aee40bb6 100644
--- a/fixincludes/tests/base/pthread.h
+++ b/fixincludes/tests/base/pthread.h
@@ -101,6 +101,16 @@ extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask);
#endif /* PTHREAD_INCOMPLETE_STRUCT_ARGUMENT_CHECK */
+#if defined( SOLARIS_COND_INIT_CHECK )
+#pragma ident "@(#)pthread.h 1.29 01/07/07 SMI"
+#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)
+#define PTHREAD_COND_INITIALIZER {{{0}, 0, 0x4356}, 0} /* = DEFAULTCV */
+#else
+#define PTHREAD_COND_INITIALIZER {{{0}, 0, 0x4356}, {0}} /* = DEFAULTCV */
+#endif
+#endif /* SOLARIS_COND_INIT_CHECK */
+
+
#if defined( SOLARIS_MUTEX_INIT_2_CHECK )
#ident "@(#)pthread.h 1.26 98/04/12 SMI"
#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)
@@ -109,9 +119,9 @@ extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask);
#define PTHREAD_MUTEX_INITIALIZER {{{0},0}, {{{0}}}, {0}}
#endif
#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)
-#define PTHREAD_COND_INITIALIZER {{{0}, 0}, 0} /* DEFAULTCV */
+#define PTHREAD_COND_INITIALIZER {{{0}, 0, 0x4356}, 0} /* DEFAULTCV */
#else
-#define PTHREAD_COND_INITIALIZER {{{0}, 0}, {0}} /* DEFAULTCV */
+#define PTHREAD_COND_INITIALIZER {{{0}, 0, 0x4356}, {0}} /* DEFAULTCV */
#endif
#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)
#define PTHREAD_MUTEX_INITIALIZER /* = DEFAULTMUTEX */ \