diff options
-rw-r--r-- | fixincludes/ChangeLog | 6 | ||||
-rw-r--r-- | fixincludes/fixincl.x | 53 | ||||
-rw-r--r-- | fixincludes/inclhack.def | 14 | ||||
-rw-r--r-- | fixincludes/tests/base/unistd.h | 5 |
4 files changed, 73 insertions, 5 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index d4ac19c..8dade5c 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,9 @@ +2018-07-23 David Edelsohn <dje.gcc@gmail.com> + + * inclhack.def (aix_unistd): New. + * fixincl.x: Regenerate. + * tests/base/unistd.h [AIX_UNISTD_CHECK]: New test. + 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk> * tests/base/ioLib.h [VXWORKS_IOLIB_INCLUDE_UNISTD_CHECK]: Add diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index 2f7e6fc..a5d7884 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 June 12, 2018 at 08:56:43 AM by AutoGen 5.18.12 + * It has been AutoGen-ed July 23, 2018 at 07:27:34 PM by AutoGen 5.18 * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Tue Jun 12 08:56:43 MDT 2018 +/* DO NOT SVN-MERGE THIS FILE, EITHER Mon Jul 23 19:27:34 UTC 2018 * * 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 250 fixup descriptions. + * This file contains 251 fixup descriptions. * * See README for more information. * @@ -1808,6 +1808,43 @@ static const char* apzAix_VolatilePatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Aix_Unistd fix + */ +tSCC zAix_UnistdName[] = + "aix_unistd"; + +/* + * File name selection pattern + */ +tSCC zAix_UnistdList[] = + "unistd.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzAix_UnistdMachs[] = { + "*-*-aix*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zAix_UnistdSelect0[] = + "[ \t]+static[ \t]+int[ \t]+getdtablesize\\(\\)"; + +#define AIX_UNISTD_TEST_CT 1 +static tTestDesc aAix_UnistdTests[] = { + { TT_EGREP, zAix_UnistdSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Aix_Unistd + */ +static const char* apzAix_UnistdPatch[] = { + "format", + "\tstatic int\t\tgetdtablesize(void)", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Alpha___Assert fix */ tSCC zAlpha___AssertName[] = @@ -10141,9 +10178,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 288 +#define REGEX_COUNT 289 #define MACH_LIST_SIZE_LIMIT 187 -#define FIX_COUNT 250 +#define FIX_COUNT 251 /* * Enumerate the fixes @@ -10190,6 +10227,7 @@ typedef enum { AIX_SYSMACHINE_FIXIDX, AIX_SYSWAIT_2_FIXIDX, AIX_VOLATILE_FIXIDX, + AIX_UNISTD_FIXIDX, ALPHA___ASSERT_FIXIDX, ALPHA_ASSERT_FIXIDX, ALPHA_GETOPT_FIXIDX, @@ -10607,6 +10645,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { AIX_VOLATILE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aAix_VolatileTests, apzAix_VolatilePatch, 0 }, + { zAix_UnistdName, zAix_UnistdList, + apzAix_UnistdMachs, + AIX_UNISTD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aAix_UnistdTests, apzAix_UnistdPatch, 0 }, + { zAlpha___AssertName, zAlpha___AssertList, apzAlpha___AssertMachs, ALPHA___ASSERT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index c1f5a13..4ce8b16 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -924,6 +924,20 @@ fix = { }; /* + * AIX unistd.h defines a static function with an empty parameter list. + */ +fix = { + hackname = aix_unistd; + mach = "*-*-aix*"; + files = unistd.h; + + select = "[ \t]+static[ \t]+int[ \t]+getdtablesize\\(\\)"; + c_fix = format; + c_fix_arg = "\tstatic int\t\tgetdtablesize(void)"; + test_text = " static int getdtablesize()"; +}; + +/* * Fix __assert declaration in assert.h on Alpha OSF/1. */ fix = { diff --git a/fixincludes/tests/base/unistd.h b/fixincludes/tests/base/unistd.h index 756451d..263df8f 100644 --- a/fixincludes/tests/base/unistd.h +++ b/fixincludes/tests/base/unistd.h @@ -9,6 +9,11 @@ +#if defined( AIX_UNISTD_CHECK ) + static int getdtablesize(void) +#endif /* AIX_UNISTD_CHECK */ + + #if defined( ALPHA_SBRK_CHECK ) extern void *sbrk(ptrdiff_t increment); #endif /* ALPHA_SBRK_CHECK */ |