summaryrefslogtreecommitdiff
path: root/fixincludes
diff options
context:
space:
mode:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-09 10:26:09 +0000
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-09 10:26:09 +0000
commitbfce477d4ecb1a383a83766247a45119be38b99d (patch)
tree14e9f4f1d8ec4a6d7e6b3a446ffad4829e0fadc7 /fixincludes
parentf966f6493bbb0d4a98c1912a7657b906b29ab9e8 (diff)
downloadgcc-bfce477d4ecb1a383a83766247a45119be38b99d.tar.gz
* inclhack.def (irix_pthread_init): New fix.
* fixincl.x: Regenerate. * tests/base/pthread.h [IRIX_PTHREAD_INIT_CHECK]: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166478 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'fixincludes')
-rw-r--r--fixincludes/ChangeLog6
-rw-r--r--fixincludes/fixincl.x53
-rw-r--r--fixincludes/inclhack.def18
-rw-r--r--fixincludes/tests/base/pthread.h7
4 files changed, 79 insertions, 5 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index ec55fb55caf..b507d65a9f3 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,9 @@
+2010-11-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * inclhack.def (irix_pthread_init): New fix.
+ * fixincl.x: Regenerate.
+ * tests/base/pthread.h [IRIX_PTHREAD_INIT_CHECK]: New test.
+
2010-10-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR c++/46024
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index 6c3172df158..d9117d8e3fd 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 Monday October 18, 2010 at 11:11:18 PM MEST
+ * It has been AutoGen-ed Monday November 8, 2010 at 08:33:47 PM MET
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT SVN-MERGE THIS FILE, EITHER Mon Oct 18 23:11:18 MEST 2010
+/* DO NOT SVN-MERGE THIS FILE, EITHER Mon Nov 8 20:33:47 MET 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 209 fixup descriptions.
+ * This file contains 210 fixup descriptions.
*
* See README for more information.
*
@@ -4665,6 +4665,43 @@ static const char* apzIrix_Limits_ConstPatch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * Description of Irix_Pthread_Init fix
+ */
+tSCC zIrix_Pthread_InitName[] =
+ "irix_pthread_init";
+
+/*
+ * File name selection pattern
+ */
+tSCC zIrix_Pthread_InitList[] =
+ "pthread.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzIrix_Pthread_InitMachs[] = {
+ "mips-sgi-irix6.5",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zIrix_Pthread_InitSelect0[] =
+ "^(#define[ \t]+PTHREAD_.*_INITIALIZER[ \t]+)(\\{ 0 \\})";
+
+#define IRIX_PTHREAD_INIT_TEST_CT 1
+static tTestDesc aIrix_Pthread_InitTests[] = {
+ { TT_EGREP, zIrix_Pthread_InitSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Irix_Pthread_Init
+ */
+static const char* apzIrix_Pthread_InitPatch[] = {
+ "format",
+ "%1{ %2 }",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
* Description of Irix_Socklen_T fix
*/
tSCC zIrix_Socklen_TName[] =
@@ -8515,9 +8552,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
-#define REGEX_COUNT 248
+#define REGEX_COUNT 249
#define MACH_LIST_SIZE_LIMIT 181
-#define FIX_COUNT 209
+#define FIX_COUNT 210
/*
* Enumerate the fixes
@@ -8636,6 +8673,7 @@ typedef enum {
IRIX_ASM_APOSTROPHE_FIXIDX,
IRIX_COMPLEX_FIXIDX,
IRIX_LIMITS_CONST_FIXIDX,
+ IRIX_PTHREAD_INIT_FIXIDX,
IRIX_SOCKLEN_T_FIXIDX,
IRIX_STDINT_C99_MODE_FIXIDX,
IRIX_STDINT_C99_TYPES_FIXIDX,
@@ -9300,6 +9338,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
IRIX_LIMITS_CONST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aIrix_Limits_ConstTests, apzIrix_Limits_ConstPatch, 0 },
+ { zIrix_Pthread_InitName, zIrix_Pthread_InitList,
+ apzIrix_Pthread_InitMachs,
+ IRIX_PTHREAD_INIT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aIrix_Pthread_InitTests, apzIrix_Pthread_InitPatch, 0 },
+
{ zIrix_Socklen_TName, zIrix_Socklen_TList,
apzIrix_Socklen_TMachs,
IRIX_SOCKLEN_T_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 9257ffa1134..ac8f795834b 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -2484,6 +2484,24 @@ fix = {
/*
+ * IRIX 6.5 PTHREAD_*_INITIALIZER need an additional level of braces in
+ * <pthread.h>.
+ */
+fix = {
+ hackname = irix_pthread_init;
+ files = pthread.h;
+ select = "^(#define[ \t]+PTHREAD_.*_INITIALIZER[ \t]+)(\\{ 0 \\})";
+
+ mach = "mips-sgi-irix6.5";
+ c_fix = format;
+ c_fix_arg = "%1{ %2 }";
+ test_text = "#define PTHREAD_MUTEX_INITIALIZER { 0 }\n"
+ "#define PTHREAD_COND_INITIALIZER { 0 }\n"
+ "#define PTHREAD_RWLOCK_INITIALIZER { 0 }";
+};
+
+
+/*
* IRIX 6.5.1[78] <sys/socket.h> has a broken definition of socklen_t.
* Various socket function prototypes use different types instead,
* depending on the API in use (BSD, XPG4/5), but the socklen_t
diff --git a/fixincludes/tests/base/pthread.h b/fixincludes/tests/base/pthread.h
index f08aee40bb6..834f0519ed2 100644
--- a/fixincludes/tests/base/pthread.h
+++ b/fixincludes/tests/base/pthread.h
@@ -96,6 +96,13 @@
#endif /* GLIBC_MUTEX_INIT_CHECK */
+#if defined( IRIX_PTHREAD_INIT_CHECK )
+#define PTHREAD_MUTEX_INITIALIZER { { 0 } }
+#define PTHREAD_COND_INITIALIZER { { 0 } }
+#define PTHREAD_RWLOCK_INITIALIZER { { 0 } }
+#endif /* IRIX_PTHREAD_INIT_CHECK */
+
+
#if defined( PTHREAD_INCOMPLETE_STRUCT_ARGUMENT_CHECK )
extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask);
#endif /* PTHREAD_INCOMPLETE_STRUCT_ARGUMENT_CHECK */