inclhack.def (aix_net_if_arp): New fix.
authorPeter O'Gorman <pogma@thewrittenword.com>
Mon, 6 Jun 2011 16:14:57 +0000 (16:14 +0000)
committerPeter O'Gorman <pogma@gcc.gnu.org>
Mon, 6 Jun 2011 16:14:57 +0000 (16:14 +0000)
        * 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
fixincludes/fixincl.x
fixincludes/inclhack.def
fixincludes/tests/base/net/if_arp.h [new file with mode: 0644]

index 4a5e1660db9a5a3b6a88e057c34693f09e088512..a3d7deab2a01947f168de4017281a72110f45ec9 100644 (file)
@@ -1,3 +1,9 @@
+2011-06-06  Peter O'Gorman  <pogma@thewrittenword.com>
+
+       * 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  <gingold@adacore.com>
 
        * inclhack.def (solaris_complex_cxx): Fix syntax.
index d9d6f6bfed114fadc5b0073d134d74df4fd22c21..ac3343d238b26f9cbf0c7ddec6eb44ebabf87638 100644 (file)
@@ -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,
index a20ab9d79a5b4ed7a0e9b39a7b830343e0ee3994..733122608c73b2cd1fc5e8883c8351dba81a879b 100644 (file)
@@ -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 (file)
index 0000000..dec20a7
--- /dev/null
@@ -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 */