*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed January 15, 2022 at 10:53:02 PM by AutoGen 5.18.16
+ * It has been AutoGen-ed January 15, 2022 at 10:53:57 PM by AutoGen 5.18.16
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Jan 15 22:53:02 UTC 2022
+/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Jan 15 22:53:57 UTC 2022
*
* 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 264 fixup descriptions.
+ * This file contains 265 fixup descriptions.
*
* See README for more information.
*
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * Description of Vxworks_Time_H_Syslib fix
+ */
+tSCC zVxworks_Time_H_SyslibName[] =
+ "vxworks_time_h_syslib";
+
+/*
+ * File name selection pattern
+ */
+tSCC zVxworks_Time_H_SyslibList[] =
+ "time.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzVxworks_Time_H_SyslibMachs[] = {
+ "*-*-vxworks*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zVxworks_Time_H_SyslibSelect0[] =
+ "[ \t]*#define[ \t]+CLOCKS_PER_SEC[ \t]+sysClkRateGet.*";
+
+#define VXWORKS_TIME_H_SYSLIB_TEST_CT 1
+static tTestDesc aVxworks_Time_H_SyslibTests[] = {
+ { TT_EGREP, zVxworks_Time_H_SyslibSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Vxworks_Time_H_Syslib
+ */
+static const char* apzVxworks_Time_H_SyslibPatch[] = {
+ "format",
+ "%0\n\
+#include <sysLib.h>",
+ "#include <vxWorks.h>|#endif.* _YVALS.*",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
* Description of X11_Class fix
*/
tSCC zX11_ClassName[] =
*
* List of all fixes
*/
-#define REGEX_COUNT 303
+#define REGEX_COUNT 304
#define MACH_LIST_SIZE_LIMIT 187
-#define FIX_COUNT 264
+#define FIX_COUNT 265
/*
* Enumerate the fixes
VXWORKS_TIME_FIXIDX,
VXWORKS_WRITE_CONST_FIXIDX,
VXWORKS_IOLIB_INCLUDE_UNISTD_FIXIDX,
+ VXWORKS_TIME_H_SYSLIB_FIXIDX,
X11_CLASS_FIXIDX,
X11_CLASS_USAGE_FIXIDX,
X11_NEW_FIXIDX,
VXWORKS_IOLIB_INCLUDE_UNISTD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aVxworks_Iolib_Include_UnistdTests, apzVxworks_Iolib_Include_UnistdPatch, 0 },
+ { zVxworks_Time_H_SyslibName, zVxworks_Time_H_SyslibList,
+ apzVxworks_Time_H_SyslibMachs,
+ VXWORKS_TIME_H_SYSLIB_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aVxworks_Time_H_SyslibTests, apzVxworks_Time_H_SyslibPatch, 0 },
+
{ zX11_ClassName, zX11_ClassList,
apzX11_ClassMachs,
X11_CLASS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
};
/*
+ * Make sure there is a visible prototype of sysClkRateGet() when
+ * CLOCKS_PER_SEC is #defined to that in time.h for VxWorks. This would
+ * typically be provided by sysLib.h.
+ *
+ * The new #include has to come after the one for vxWorks.h in kernel headers
+ * and vxWorks.h is typically not #included in RTP headers. yvals.h is
+ * conditionally included in the latter, instead, and new #include are better
+ * inserted after that.
+ */
+fix = {
+ hackname = vxworks_time_h_syslib;
+ files = time.h;
+ mach = "*-*-vxworks*";
+ select = "[ \t]*#define[ \t]+CLOCKS_PER_SEC[ \t]+sysClkRateGet.*";
+
+ c_fix = format;
+ c_fix_arg = "%0\n#include <sysLib.h>";
+ c_fix_arg = "#include <vxWorks.h>|#endif.* _YVALS.*";
+
+ test_text =
+ "/* kernel header pattern: */\n"
+ "#include <vxWorks.h>\n"
+ "\n"
+ "/* rtp header pattern: */\n"
+ "#ifndef _YVALS\n"
+ "#include <yvals.h>\n"
+ "#endif /* _YVALS */\n"
+ "\n"
+ "#define CLOCKS_PER_SEC sysClkRateGet()";
+};
+
+/*
* There are several name conflicts with C++ reserved words in X11 header
* files. These are fixed in some versions, so don't do the fixes if
* we find __cplusplus in the file. These were found on the RS/6000.