diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2021-01-03 21:40:04 +0100 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2021-01-03 21:40:04 +0100 |
commit | afae4a55ccaa0de95ea11e5f634084db6ab2f444 (patch) | |
tree | d632cc867d10410ba9fb750523be790b86846ac4 /fixincludes | |
parent | 9d9a82ec8478ff52c7a9d61f58cd2a7b6295b5f9 (diff) | |
parent | d2eb616a0f7bea78164912aa438c29fe1ef5774a (diff) | |
download | gcc-afae4a55ccaa0de95ea11e5f634084db6ab2f444.zip gcc-afae4a55ccaa0de95ea11e5f634084db6ab2f444.tar.gz gcc-afae4a55ccaa0de95ea11e5f634084db6ab2f444.tar.bz2 |
Merge branch 'master' into devel/coarray_native
Diffstat (limited to 'fixincludes')
-rw-r--r-- | fixincludes/ChangeLog | 12 | ||||
-rw-r--r-- | fixincludes/fixincl.x | 53 | ||||
-rw-r--r-- | fixincludes/inclhack.def | 14 | ||||
-rw-r--r-- | fixincludes/tests/base/sys/types.h | 5 |
4 files changed, 79 insertions, 5 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index 1428c68..cc1fbe7 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,15 @@ +2020-12-14 Ilya Leoshkevich <iii@linux.ibm.com> + + * fixincl.x: Rerun genfixes. + * inclhack.def(aix_physadr_t): Change test_text to something + that needs to be replaced. + * tests/base/sys/types.h(aix_physadr_t): Add expectation. + +2020-11-18 Nathan Sidwell <nathan@acm.org> + + * inclhack.def (aix_physaddr_t): New. + * fixincl.x: Regenerated. + 2020-10-03 Clément Chigot <clement.chigot@atos.net> * inclhack.def (aix_malloc): Add more context to select. diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index 758d562..cc17edf 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 October 3, 2020 at 11:40:52 PM by AutoGen 5.18 + * It has been AutoGen-ed December 9, 2020 at 11:16:08 AM by AutoGen 5.18.16 * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Oct 3 23:40:52 UTC 2020 +/* DO NOT SVN-MERGE THIS FILE, EITHER Wed Dec 9 11:16:08 EST 2020 * * 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 259 fixup descriptions. + * This file contains 260 fixup descriptions. * * See README for more information. * @@ -1249,6 +1249,43 @@ static const char* apzAix_Rwlock_Initializer_1Patch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Aix_Physadr_T fix + */ +tSCC zAix_Physadr_TName[] = + "aix_physadr_t"; + +/* + * File name selection pattern + */ +tSCC zAix_Physadr_TList[] = + "sys/types.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzAix_Physadr_TMachs[] = { + "*-*-aix*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zAix_Physadr_TSelect0[] = + "typedef[ \t]*struct[ \t]*([{][^}]*[}][ \t]*\\*[ \t]*physadr_t;)"; + +#define AIX_PHYSADR_T_TEST_CT 1 +static tTestDesc aAix_Physadr_TTests[] = { + { TT_EGREP, zAix_Physadr_TSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Aix_Physadr_T + */ +static const char* apzAix_Physadr_TPatch[] = { + "format", + "typedef struct __physadr_s %1", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Aix_Pthread fix */ tSCC zAix_PthreadName[] = @@ -10521,9 +10558,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 297 +#define REGEX_COUNT 298 #define MACH_LIST_SIZE_LIMIT 187 -#define FIX_COUNT 259 +#define FIX_COUNT 260 /* * Enumerate the fixes @@ -10555,6 +10592,7 @@ typedef enum { AIX_MUTEX_INITIALIZER_1_FIXIDX, AIX_COND_INITIALIZER_1_FIXIDX, AIX_RWLOCK_INITIALIZER_1_FIXIDX, + AIX_PHYSADR_T_FIXIDX, AIX_PTHREAD_FIXIDX, AIX_STDINT_1_FIXIDX, AIX_STDINT_2_FIXIDX, @@ -10921,6 +10959,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { AIX_RWLOCK_INITIALIZER_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aAix_Rwlock_Initializer_1Tests, apzAix_Rwlock_Initializer_1Patch, 0 }, + { zAix_Physadr_TName, zAix_Physadr_TList, + apzAix_Physadr_TMachs, + AIX_PHYSADR_T_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aAix_Physadr_TTests, apzAix_Physadr_TPatch, 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 47eb236..3a4cfe0 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -720,6 +720,20 @@ fix = { "{ \\\\\n"; }; + +/* On AIX 'typedef struct {<stuff>} * physadr_t;' needs to give the struct a + name for linkage purposes. Fortunately it is on exactly one + line. */ +fix = { + hackname = aix_physadr_t; + mach = "*-*-aix*"; + files = sys/types.h; + select = "typedef[ \t]*struct[ \t]*([{][^}]*[}][ \t]*\\*[ \t]*physadr_t;)"; + c_fix = format; + c_fix_arg = "typedef struct __physadr_s %1"; + test_text = "typedef struct { random stuff } * physadr_t;"; +}; + /* * 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/sys/types.h b/fixincludes/tests/base/sys/types.h index 683b5e9..7340e76 100644 --- a/fixincludes/tests/base/sys/types.h +++ b/fixincludes/tests/base/sys/types.h @@ -9,6 +9,11 @@ +#if defined( AIX_PHYSADR_T_CHECK ) +typedef struct __physadr_s { random stuff } * physadr_t; +#endif /* AIX_PHYSADR_T_CHECK */ + + #if defined( GNU_TYPES_CHECK ) #if !defined(_GCC_PTRDIFF_T) #define _GCC_PTRDIFF_T |