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
This commit is contained in:
Roger Sayle 2004-04-24 22:42:29 +00:00 committed by Roger Sayle
parent 062bf89593
commit d3535e8070
4 changed files with 72 additions and 5 deletions

View File

@ -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

View File

@ -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.
*
@ -647,6 +647,41 @@ static const char* apzAix_SyswaitPatch[] = {
%0",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* 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
@ -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,

View File

@ -493,6 +493,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

View File

@ -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 */