From 11b815cab8300efb59005e2bbc27b79cca11b669 Mon Sep 17 00:00:00 2001 From: Peter O'Gorman Date: Mon, 6 Jun 2011 16:14:57 +0000 Subject: [PATCH] inclhack.def (aix_net_if_arp): New fix. * inclhack.def (aix_net_if_arp): New fix. * fixincl.x: Regenerate. * tests/base/net/if_arp.h [AIX_NET_IF_ARP_CHECK]: New test. From-SVN: r174707 --- fixincludes/ChangeLog | 6 ++++ fixincludes/fixincl.x | 53 ++++++++++++++++++++++++++--- fixincludes/inclhack.def | 13 +++++++ fixincludes/tests/base/net/if_arp.h | 16 +++++++++ 4 files changed, 83 insertions(+), 5 deletions(-) create mode 100644 fixincludes/tests/base/net/if_arp.h diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index 4a5e1660db9..a3d7deab2a0 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,9 @@ +2011-06-06 Peter O'Gorman + + * inclhack.def (aix_net_if_arp): New fix. + * fixincl.x: Regenerate. + * tests/base/net/if_arp.h [AIX_NET_IF_ARP_CHECK]: New test. + 2011-05-17 Tristan Gingold * inclhack.def (solaris_complex_cxx): Fix syntax. diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index d9d6f6bfed1..ac3343d238b 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 May 16, 2011 at 02:55:35 PM by AutoGen 5.11.1 + * It has been AutoGen-ed Sunday June 5, 2011 at 09:04:54 PM CDT * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Mon May 16 14:55:35 CEST 2011 +/* DO NOT SVN-MERGE THIS FILE, EITHER Sun Jun 5 21:04:54 CDT 2011 * * 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 210 fixup descriptions. + * This file contains 211 fixup descriptions. * * See README for more information. * @@ -520,6 +520,43 @@ static const char* apzAix_ComplexPatch[] = { "#define _Complex_I (__extension__ 1.0iF)", (char*)NULL }; +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Aix_Net_If_Arp fix + */ +tSCC zAix_Net_If_ArpName[] = + "aix_net_if_arp"; + +/* + * File name selection pattern + */ +tSCC zAix_Net_If_ArpList[] = + "net/if_arp.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzAix_Net_If_ArpMachs[] = { + "*-*-aix*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zAix_Net_If_ArpSelect0[] = + "^struct fc_softc \\{"; + +#define AIX_NET_IF_ARP_TEST_CT 1 +static tTestDesc aAix_Net_If_ArpTests[] = { + { TT_EGREP, zAix_Net_If_ArpSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Aix_Net_If_Arp + */ +static const char* apzAix_Net_If_ArpPatch[] = { + "format", + "typedef struct _fc_softc {", + (char*)NULL }; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * Description of Aix_Pthread fix @@ -8554,9 +8591,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 249 +#define REGEX_COUNT 250 #define MACH_LIST_SIZE_LIMIT 181 -#define FIX_COUNT 210 +#define FIX_COUNT 211 /* * Enumerate the fixes @@ -8571,6 +8608,7 @@ typedef enum { AAB_SOLARIS_SYS_VARARGS_H_FIXIDX, AAB_SUN_MEMCPY_FIXIDX, AIX_COMPLEX_FIXIDX, + AIX_NET_IF_ARP_FIXIDX, AIX_PTHREAD_FIXIDX, AIX_STDINT_1_FIXIDX, AIX_STDINT_2_FIXIDX, @@ -8820,6 +8858,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { AIX_COMPLEX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aAix_ComplexTests, apzAix_ComplexPatch, 0 }, + { zAix_Net_If_ArpName, zAix_Net_If_ArpList, + apzAix_Net_If_ArpMachs, + AIX_NET_IF_ARP_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aAix_Net_If_ArpTests, apzAix_Net_If_ArpPatch, 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 a20ab9d79a5..733122608c7 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -369,6 +369,19 @@ fix = { test_text = "#define _Complex_I __I\n"; }; +/* + * net/if_arp.h defines a variable fc_softc instead of adding a + * typedef for the struct on AIX 5.2, 5.3, 6.1 and 7.1 + */ +fix = { + hackname = aix_net_if_arp; + mach = "*-*-aix*"; + files = "net/if_arp.h"; + select = "^struct fc_softc \\{"; + c_fix = format; + c_fix_arg = "typedef struct _fc_softc {"; + test_text = "struct fc_softc {\n int a;\n};"; +}; /* * pthread.h on AIX 4.3.3 tries to define a macro without whitspace diff --git a/fixincludes/tests/base/net/if_arp.h b/fixincludes/tests/base/net/if_arp.h new file mode 100644 index 00000000000..dec20a7bd70 --- /dev/null +++ b/fixincludes/tests/base/net/if_arp.h @@ -0,0 +1,16 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/net/if_arp.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( AIX_NET_IF_ARP_CHECK ) +typedef struct _fc_softc { + int a; +}; +#endif /* AIX_NET_IF_ARP_CHECK */ -- 2.30.2