aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2004-04-24 22:42:29 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2004-04-24 22:42:29 +0000
commitd3535e80704205ad87e0b838d97dd630d4ec1359 (patch)
treebc0d50bcb28a878875c0f8d9b868f09a581c32e6
parent062bf895938ee3130690ac20a8b571f6d61e7dc1 (diff)
downloadgcc-d3535e80704205ad87e0b838d97dd630d4ec1359.zip
gcc-d3535e80704205ad87e0b838d97dd630d4ec1359.tar.gz
gcc-d3535e80704205ad87e0b838d97dd630d4ec1359.tar.bz2
inclhack.def (aix_syswait_2): New fix.
* fixinc/inclhack.def (aix_syswait_2): New fix. * fixinc/fixincl.x: Regenerate. * fixinc/tests/base/sys/wait.h: Update for new test. Co-Authored-By: Bruce Korb <bkorb@gnu.org> From-SVN: r81147
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/fixinc/fixincl.x51
-rw-r--r--gcc/fixinc/inclhack.def14
-rw-r--r--gcc/fixinc/tests/base/sys/wait.h5
4 files changed, 72 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b81ca85..8c70524 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2004-04-24 Roger Sayle <roger@eyesopen.com>
+ Bruce Korb <bkorb@gnu.org>
+
+ * fixinc/inclhack.def (aix_syswait_2): New fix.
+ * fixinc/fixincl.x: Regenerate.
+ * fixinc/tests/base/sys/wait.h: Update for new test.
+
2004-04-24 Alan Modra <amodra@bigpond.net.au>
PR target/14960
diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x
index f3a1149..efd41f3 100644
--- a/gcc/fixinc/fixincl.x
+++ b/gcc/fixinc/fixincl.x
@@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed Wednesday April 7, 2004 at 10:23:41 PM UTC
+ * It has been AutoGen-ed Friday April 23, 2004 at 06:53:51 AM MDT
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT CVS-MERGE THIS FILE, EITHER Wed Apr 7 22:23:41 UTC 2004
+/* DO NOT CVS-MERGE THIS FILE, EITHER Fri Apr 23 06:53:51 MDT 2004
*
* 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 174 fixup descriptions.
+ * This file contains 175 fixup descriptions.
*
* See README for more information.
*
@@ -649,6 +649,41 @@ static const char* apzAix_SyswaitPatch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * Description of Aix_Syswait_2 fix
+ */
+tSCC zAix_Syswait_2Name[] =
+ "aix_syswait_2";
+
+/*
+ * File name selection pattern
+ */
+tSCC zAix_Syswait_2List[] =
+ "|sys/wait.h|";
+/*
+ * Machine/OS name selection pattern
+ */
+#define apzAix_Syswait_2Machs (const char**)NULL
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zAix_Syswait_2Select0[] =
+ "\\? (\\(\\(\\(\\(unsigned[^)]*\\)[^)]*\\) >> [^)]*\\) \\& 0xff\\) : -1)";
+
+#define AIX_SYSWAIT_2_TEST_CT 1
+static tTestDesc aAix_Syswait_2Tests[] = {
+ { TT_EGREP, zAix_Syswait_2Select0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Aix_Syswait_2
+ */
+static const char* apzAix_Syswait_2Patch[] = {
+ "format",
+ "? (int)%1",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
* Description of Aix_Volatile fix
*/
tSCC zAix_VolatileName[] =
@@ -6894,9 +6929,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
-#define REGEX_COUNT 195
+#define REGEX_COUNT 196
#define MACH_LIST_SIZE_LIMIT 261
-#define FIX_COUNT 174
+#define FIX_COUNT 175
/*
* Enumerate the fixes
@@ -6914,6 +6949,7 @@ typedef enum {
AIX_PTHREAD_FIXIDX,
AIX_SYSMACHINE_FIXIDX,
AIX_SYSWAIT_FIXIDX,
+ AIX_SYSWAIT_2_FIXIDX,
AIX_VOLATILE_FIXIDX,
ALPHA___ASSERT_FIXIDX,
ALPHA___EXTERN_PREFIX_FIXIDX,
@@ -7139,6 +7175,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
AIX_SYSWAIT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aAix_SyswaitTests, apzAix_SyswaitPatch, 0 },
+ { zAix_Syswait_2Name, zAix_Syswait_2List,
+ apzAix_Syswait_2Machs,
+ AIX_SYSWAIT_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aAix_Syswait_2Tests, apzAix_Syswait_2Patch, 0 },
+
{ zAix_VolatileName, zAix_VolatileList,
apzAix_VolatileMachs,
AIX_VOLATILE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def
index 086b8c0..2e57d0f 100644
--- a/gcc/fixinc/inclhack.def
+++ b/gcc/fixinc/inclhack.def
@@ -494,6 +494,20 @@ fix = {
/*
+ * sys/wait.h on AIX 5.2 defines macros that have both signed and
+ * unsigned types in conditional expressions.
+ */
+fix = {
+ hackname = aix_syswait_2;
+ files = sys/wait.h;
+ select = '\? (\(\(\(\(unsigned[^)]*\)[^)]*\) >> [^)]*\) \& 0xff\) : -1)';
+ c_fix = format;
+ c_fix_arg = "? (int)%1";
+ test_text = "#define WSTOPSIG(__x) (int)(WIFSTOPPED(__x) ? ((((unsigned int)__x) >> 8) & 0xff) : -1)";
+};
+
+
+/*
* sys/signal.h on some versions of AIX uses volatile in the typedef of
* sig_atomic_t, which causes gcc to generate a warning about duplicate
* volatile when a sig_atomic_t variable is declared volatile, as
diff --git a/gcc/fixinc/tests/base/sys/wait.h b/gcc/fixinc/tests/base/sys/wait.h
index c0edf05..a0311c6 100644
--- a/gcc/fixinc/tests/base/sys/wait.h
+++ b/gcc/fixinc/tests/base/sys/wait.h
@@ -17,6 +17,11 @@ extern pid_t wait3();
#endif /* AIX_SYSWAIT_CHECK */
+#if defined( AIX_SYSWAIT_2_CHECK )
+#define WSTOPSIG(__x) (int)(WIFSTOPPED(__x) ? (int)((((unsigned int)__x) >> 8) & 0xff) : -1)
+#endif /* AIX_SYSWAIT_2_CHECK */
+
+
#if defined( NEXT_WAIT_UNION_CHECK )
extern pid_d wait(void*);
#endif /* NEXT_WAIT_UNION_CHECK */