summaryrefslogtreecommitdiff
path: root/fixincludes
diff options
context:
space:
mode:
Diffstat (limited to 'fixincludes')
-rw-r--r--fixincludes/ChangeLog18
-rw-r--r--fixincludes/fixincl.x145
-rw-r--r--fixincludes/inclhack.def43
-rw-r--r--fixincludes/tests/base/pthread.h21
4 files changed, 217 insertions, 10 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index ea201c3080c..1b382e0dc37 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,13 @@
+2012-06-19 David Edelsohn <dje.gcc@gmail.com>
+
+ * inclhack.def (aix_mutex_initializer_1): New fix.
+ (aix_cond_initializer_1): New fix.
+ (aix_rwlock_initializer): New fix.
+ * fixincl.x: Regenerate.
+ * tests/base/pthread.h [AIX_MUTEX_INITIALIZER_1_CHECK]: New.
+ [AIX_COND_INITIALIZER_1_CHECK]: New.
+ [AIX_RWLOCK_INITIALIZER_1_CHECK]: New.
+
2012-05-29 Thomas Schwinge <thomas@codesourcery.com>
* configure.ac: Use GCC_AC_FUNC_MMAP_BLACKLIST instead of
@@ -17,7 +27,7 @@
* inclhack.def (aix_malloc): New.
* fixincl.x: Regenerate.
* tests/base/malloc.h [AIX_MALLOC_CHECK]: New.
-
+
2012-03-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR other/52626
@@ -454,7 +464,7 @@
* inclhack.def (aix_complex): New fix.
* fixincl.x: Regenerate.
-
+
2009-08-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* inclhack.def (hpux_inttype_int_least8_t): Also apply on hpux10*.
@@ -902,7 +912,7 @@
* fixincludes/mkfixinc.sh: Add "*-*-vxworks*" to the list of
targets for which a no-op fixer is appropriate.
-
+
2006-11-07 Richard Guenther <rguenther@suse.de>
* inclhack.def (glibc_c99_inline_2): Adjust for glibc 2.3
@@ -988,7 +998,7 @@
* inclhack.def (solaris_once_init_1): New.
* tests/base/pthread.h: Adjust for new fix.
-
+
* fixincl.x: Regenerate.
2006-07-17 Roger Sayle <roger@eyesopen.com>
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index 3dbb744fec1..31c466796de 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 March 23, 2012 at 02:26:20 PM by AutoGen 5.10
+ * It has been AutoGen-ed June 19, 2012 at 09:23:54 AM by AutoGen 5.10
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT SVN-MERGE THIS FILE, EITHER Fri Mar 23 14:26:20 EDT 2012
+/* DO NOT SVN-MERGE THIS FILE, EITHER Tue Jun 19 09:23:54 EDT 2012
*
* 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 212 fixup descriptions.
+ * This file contains 215 fixup descriptions.
*
* See README for more information.
*
@@ -674,6 +674,123 @@ static const char* apzAix_Once_Init_2Patch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * Description of Aix_Mutex_Initializer_1 fix
+ */
+tSCC zAix_Mutex_Initializer_1Name[] =
+ "aix_mutex_initializer_1";
+
+/*
+ * File name selection pattern
+ */
+tSCC zAix_Mutex_Initializer_1List[] =
+ "pthread.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzAix_Mutex_Initializer_1Machs[] = {
+ "*-*-aix*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zAix_Mutex_Initializer_1Select0[] =
+ "#define[ \t]PTHREAD_MUTEX_INITIALIZER \\\\\n\
+\\{ \\\\\n";
+
+#define AIX_MUTEX_INITIALIZER_1_TEST_CT 1
+static tTestDesc aAix_Mutex_Initializer_1Tests[] = {
+ { TT_EGREP, zAix_Mutex_Initializer_1Select0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Aix_Mutex_Initializer_1
+ */
+static const char* apzAix_Mutex_Initializer_1Patch[] = {
+ "format",
+ "#define PTHREAD_MUTEX_INITIALIZER \\\n\
+{{ \\\n",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Aix_Cond_Initializer_1 fix
+ */
+tSCC zAix_Cond_Initializer_1Name[] =
+ "aix_cond_initializer_1";
+
+/*
+ * File name selection pattern
+ */
+tSCC zAix_Cond_Initializer_1List[] =
+ "pthread.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzAix_Cond_Initializer_1Machs[] = {
+ "*-*-aix*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zAix_Cond_Initializer_1Select0[] =
+ "#define[ \t]PTHREAD_COND_INITIALIZER \\\\\n\
+\\{ \\\\\n";
+
+#define AIX_COND_INITIALIZER_1_TEST_CT 1
+static tTestDesc aAix_Cond_Initializer_1Tests[] = {
+ { TT_EGREP, zAix_Cond_Initializer_1Select0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Aix_Cond_Initializer_1
+ */
+static const char* apzAix_Cond_Initializer_1Patch[] = {
+ "format",
+ "#define PTHREAD_COND_INITIALIZER \\\n\
+{{ \\\n",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Aix_Rwlock_Initializer_1 fix
+ */
+tSCC zAix_Rwlock_Initializer_1Name[] =
+ "aix_rwlock_initializer_1";
+
+/*
+ * File name selection pattern
+ */
+tSCC zAix_Rwlock_Initializer_1List[] =
+ "pthread.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzAix_Rwlock_Initializer_1Machs[] = {
+ "*-*-aix*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zAix_Rwlock_Initializer_1Select0[] =
+ "#define[ \t]PTHREAD_RWLOCK_INITIALIZER \\\\\n\
+\\{ \\\\\n";
+
+#define AIX_RWLOCK_INITIALIZER_1_TEST_CT 1
+static tTestDesc aAix_Rwlock_Initializer_1Tests[] = {
+ { TT_EGREP, zAix_Rwlock_Initializer_1Select0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Aix_Rwlock_Initializer_1
+ */
+static const char* apzAix_Rwlock_Initializer_1Patch[] = {
+ "format",
+ "#define PTHREAD_RWLOCK_INITIALIZER \\\n\
+{{ \\\n",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
* Description of Aix_Pthread fix
*/
tSCC zAix_PthreadName[] =
@@ -8629,9 +8746,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
-#define REGEX_COUNT 255
+#define REGEX_COUNT 258
#define MACH_LIST_SIZE_LIMIT 181
-#define FIX_COUNT 212
+#define FIX_COUNT 215
/*
* Enumerate the fixes
@@ -8650,6 +8767,9 @@ typedef enum {
AIX_NET_IF_ARP_FIXIDX,
AIX_ONCE_INIT_1_FIXIDX,
AIX_ONCE_INIT_2_FIXIDX,
+ AIX_MUTEX_INITIALIZER_1_FIXIDX,
+ AIX_COND_INITIALIZER_1_FIXIDX,
+ AIX_RWLOCK_INITIALIZER_1_FIXIDX,
AIX_PTHREAD_FIXIDX,
AIX_STDINT_1_FIXIDX,
AIX_STDINT_2_FIXIDX,
@@ -8917,6 +9037,21 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
AIX_ONCE_INIT_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aAix_Once_Init_2Tests, apzAix_Once_Init_2Patch, 0 },
+ { zAix_Mutex_Initializer_1Name, zAix_Mutex_Initializer_1List,
+ apzAix_Mutex_Initializer_1Machs,
+ AIX_MUTEX_INITIALIZER_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aAix_Mutex_Initializer_1Tests, apzAix_Mutex_Initializer_1Patch, 0 },
+
+ { zAix_Cond_Initializer_1Name, zAix_Cond_Initializer_1List,
+ apzAix_Cond_Initializer_1Machs,
+ AIX_COND_INITIALIZER_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aAix_Cond_Initializer_1Tests, apzAix_Cond_Initializer_1Patch, 0 },
+
+ { zAix_Rwlock_Initializer_1Name, zAix_Rwlock_Initializer_1List,
+ apzAix_Rwlock_Initializer_1Machs,
+ AIX_RWLOCK_INITIALIZER_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aAix_Rwlock_Initializer_1Tests, apzAix_Rwlock_Initializer_1Patch, 0 },
+
{ zAix_PthreadName, zAix_PthreadList,
apzAix_PthreadMachs,
AIX_PTHREAD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 8a26f2837ba..82792afdbe3 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -397,7 +397,9 @@ fix = {
};
/*
- * pthread.h on AIX defines PTHREAD_ONCE_INIT without enough braces.
+ * pthread.h on AIX defines PTHREAD_ONCE_INIT, PTHREAD_MUTEX_INITIALIZER,
+ * PTHREAD_COND_INITIALIZER and PTHREAD_RWLOCK_INITIALIZER without enough
+ * braces.
*/
fix = {
hackname = aix_once_init_1;
@@ -425,6 +427,45 @@ fix = {
"}\n";
};
+fix = {
+ hackname = aix_mutex_initializer_1;
+ mach = "*-*-aix*";
+ files = "pthread.h";
+ select = "#define[ \t]PTHREAD_MUTEX_INITIALIZER \\\\\n"
+ "\\{ \\\\\n";
+ c_fix = format;
+ c_fix_arg = "#define PTHREAD_MUTEX_INITIALIZER \\\n"
+ "{{ \\\n";
+ test_text = "#define PTHREAD_MUTEX_INITIALIZER \\\\\n"
+ "{ \\\\\n";
+};
+
+fix = {
+ hackname = aix_cond_initializer_1;
+ mach = "*-*-aix*";
+ files = "pthread.h";
+ select = "#define[ \t]PTHREAD_COND_INITIALIZER \\\\\n"
+ "\\{ \\\\\n";
+ c_fix = format;
+ c_fix_arg = "#define PTHREAD_COND_INITIALIZER \\\n"
+ "{{ \\\n";
+ test_text = "#define PTHREAD_COND_INITIALIZER \\\\\n"
+ "{ \\\\\n";
+};
+
+fix = {
+ hackname = aix_rwlock_initializer_1;
+ mach = "*-*-aix*";
+ files = "pthread.h";
+ select = "#define[ \t]PTHREAD_RWLOCK_INITIALIZER \\\\\n"
+ "\\{ \\\\\n";
+ c_fix = format;
+ c_fix_arg = "#define PTHREAD_RWLOCK_INITIALIZER \\\n"
+ "{{ \\\n";
+ test_text = "#define PTHREAD_RWLOCK_INITIALIZER \\\\\n"
+ "{ \\\\\n";
+};
+
/*
* pthread.h on AIX 4.3.3 tries to define a macro without whitspace
* which violates a requirement of ISO C.
diff --git a/fixincludes/tests/base/pthread.h b/fixincludes/tests/base/pthread.h
index 97200c4720f..1d28067ad57 100644
--- a/fixincludes/tests/base/pthread.h
+++ b/fixincludes/tests/base/pthread.h
@@ -23,6 +23,27 @@
#endif /* AIX_ONCE_INIT_2_CHECK */
+#if defined( AIX_MUTEX_INITIALIZER_1_CHECK )
+#define PTHREAD_MUTEX_INITIALIZER \
+{{ \
+
+#endif /* AIX_MUTEX_INITIALIZER_1_CHECK */
+
+
+#if defined( AIX_COND_INITIALIZER_1_CHECK )
+#define PTHREAD_COND_INITIALIZER \
+{{ \
+
+#endif /* AIX_COND_INITIALIZER_1_CHECK */
+
+
+#if defined( AIX_RWLOCK_INITIALIZER_1_CHECK )
+#define PTHREAD_RWLOCK_INITIALIZER \
+{{ \
+
+#endif /* AIX_RWLOCK_INITIALIZER_1_CHECK */
+
+
#if defined( AIX_PTHREAD_CHECK )
#define PTHREAD_MUTEX_INITIALIZER \
{...init stuff...}