*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed Saturday March 28, 2015 at 01:24:12 PM EDT
+ * It has been AutoGen-ed May 21, 2015 at 02:48:12 AM by AutoGen 5.18.3
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT SVN-MERGE THIS FILE, EITHER Sat 28 Mar 2015 13:24:12 EDT
+/* DO NOT SVN-MERGE THIS FILE, EITHER Thu May 21 02:48:12 UTC 2015
*
* You must regenerate it. Use the ./genfixes script.
*
* 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 226 fixup descriptions.
+ * This file contains 229 fixup descriptions.
*
* See README for more information.
*
"#define _Complex_I (__extension__ 1.0iF)",
(char*)NULL };
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Aix_Externc fix
+ */
+tSCC zAix_ExterncName[] =
+ "aix_externc";
+
+/*
+ * File name selection pattern
+ */
+tSCC zAix_ExterncList[] =
+ "ctype.h\0fcntl.h\0langinfo.h\0ldfcn.h\0sys/localedef.h\0sys/times.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzAix_ExterncMachs[] = {
+ "*-*-aix*",
+ (const char*)NULL };
+
+/*
+ * content bypass pattern - skip fix if pattern found
+ */
+tSCC zAix_ExterncBypass0[] =
+ "extern \"C\"";
+
+#define AIX_EXTERNC_TEST_CT 1
+static tTestDesc aAix_ExterncTests[] = {
+ { TT_NEGREP, zAix_ExterncBypass0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Aix_Externc
+ */
+static const char* apzAix_ExterncPatch[] = {
+ "wrap",
+ "#ifdef __cplusplus\n\
+extern \"C\" {\n\
+#endif\n",
+ "#ifdef __cplusplus\n\
+}\n\
+#endif\n",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Aix_Externcpp1 fix
+ */
+tSCC zAix_Externcpp1Name[] =
+ "aix_externcpp1";
+
+/*
+ * File name selection pattern
+ */
+tSCC zAix_Externcpp1List[] =
+ "sys/socket.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzAix_Externcpp1Machs[] = {
+ "*-*-aix*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zAix_Externcpp1Select0[] =
+ "#ifdef __cplusplus";
+
+#define AIX_EXTERNCPP1_TEST_CT 1
+static tTestDesc aAix_Externcpp1Tests[] = {
+ { TT_EGREP, zAix_Externcpp1Select0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Aix_Externcpp1
+ */
+static const char* apzAix_Externcpp1Patch[] = {
+ "format",
+ "#ifdef __cplusplus\n\
+extern \"C++\" {",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Aix_Externcpp2 fix
+ */
+tSCC zAix_Externcpp2Name[] =
+ "aix_externcpp2";
+
+/*
+ * File name selection pattern
+ */
+tSCC zAix_Externcpp2List[] =
+ "sys/socket.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzAix_Externcpp2Machs[] = {
+ "*-*-aix*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zAix_Externcpp2Select0[] =
+ "#else /\\* __cplusplus \\*/";
+
+#define AIX_EXTERNCPP2_TEST_CT 1
+static tTestDesc aAix_Externcpp2Tests[] = {
+ { TT_EGREP, zAix_Externcpp2Select0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Aix_Externcpp2
+ */
+static const char* apzAix_Externcpp2Patch[] = {
+ "format",
+ "} /* extern \"C++\" */\n\
+#else /* __cplusplus */",
+ (char*)NULL };
+
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Aix_Malloc fix
*
* List of all fixes
*/
-#define REGEX_COUNT 263
+#define REGEX_COUNT 266
#define MACH_LIST_SIZE_LIMIT 187
-#define FIX_COUNT 226
+#define FIX_COUNT 229
/*
* Enumerate the fixes
AAB_VXWORKS_UNISTD_FIXIDX,
AIX_ASSERT_FIXIDX,
AIX_COMPLEX_FIXIDX,
+ AIX_EXTERNC_FIXIDX,
+ AIX_EXTERNCPP1_FIXIDX,
+ AIX_EXTERNCPP2_FIXIDX,
AIX_MALLOC_FIXIDX,
AIX_NET_IF_ARP_FIXIDX,
AIX_NULL_FIXIDX,
AIX_COMPLEX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aAix_ComplexTests, apzAix_ComplexPatch, 0 },
+ { zAix_ExterncName, zAix_ExterncList,
+ apzAix_ExterncMachs,
+ AIX_EXTERNC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aAix_ExterncTests, apzAix_ExterncPatch, 0 },
+
+ { zAix_Externcpp1Name, zAix_Externcpp1List,
+ apzAix_Externcpp1Machs,
+ AIX_EXTERNCPP1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aAix_Externcpp1Tests, apzAix_Externcpp1Patch, 0 },
+
+ { zAix_Externcpp2Name, zAix_Externcpp2List,
+ apzAix_Externcpp2Machs,
+ AIX_EXTERNCPP2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aAix_Externcpp2Tests, apzAix_Externcpp2Patch, 0 },
+
{ zAix_MallocName, zAix_MallocList,
apzAix_MallocMachs,
AIX_MALLOC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
test_text = "#define _Complex_I __I\n";
};
+/*
+ * On AIX some headers are not properly guarded by 'extern "C"'.
+ */
+fix = {
+ hackname = aix_externc;
+ mach = "*-*-aix*";
+ files = ctype.h;
+ files = fcntl.h;
+ files = langinfo.h;
+ files = ldfcn.h;
+ files = sys/localedef.h;
+ files = sys/times.h;
+ bypass = "extern \"C\"";
+ c_fix = wrap;
+ c_fix_arg = "#ifdef __cplusplus\n"
+ "extern \"C\" {\n"
+ "#endif\n";
+ c_fix_arg = "#ifdef __cplusplus\n"
+ "}\n"
+ "#endif\n";
+ test_text = "extern int __n_pthreads;\n";
+};
+
+/*
+ * On AIX sys/socket.h assumes C++.
+ */
+fix = {
+ hackname = aix_externcpp1;
+ mach = "*-*-aix*";
+ files = "sys/socket.h";
+ select = "#ifdef __cplusplus";
+ c_fix = format;
+ c_fix_arg = "#ifdef __cplusplus\n"
+ "extern \"C++\" {";
+ test_text = "#ifdef __cplusplus";
+
+};
+
+fix = {
+ hackname = aix_externcpp2;
+ mach = "*-*-aix*";
+ files = "sys/socket.h";
+ select = "#else /\\* __cplusplus \\*/";
+ c_fix = format;
+ c_fix_arg = "} /* extern \"C++\" */\n"
+ "#else /* __cplusplus */";
+ test_text = "#else /* __cplusplus */";
+
+};
+
/*
* malloc.h on AIX6 uses XLC++ specific builtin syntax
*/