*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed January 1, 2022 at 11:58:02 AM by AutoGen 5.18.16
+ * It has been AutoGen-ed January 4, 2022 at 10:24:34 AM by AutoGen 5.18.16
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Jan 1 11:58:02 CET 2022
+/* DO NOT SVN-MERGE THIS FILE, EITHER Tue Jan 4 10:24:34 UTC 2022
*
* You must regenerate it. Use the ./genfixes script.
*
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description of Vxworks_Mkdir_Macro fix
+ * Description of Vxworks_Posix_Mkdir fix
*/
-tSCC zVxworks_Mkdir_MacroName[] =
- "vxworks_mkdir_macro";
+tSCC zVxworks_Posix_MkdirName[] =
+ "vxworks_posix_mkdir";
/*
* File name selection pattern
*/
-tSCC zVxworks_Mkdir_MacroList[] =
+tSCC zVxworks_Posix_MkdirList[] =
"sys/stat.h\0";
/*
* Machine/OS name selection pattern
*/
-tSCC* apzVxworks_Mkdir_MacroMachs[] = {
+tSCC* apzVxworks_Posix_MkdirMachs[] = {
"*-*-vxworks*",
(const char*)NULL };
-#define VXWORKS_MKDIR_MACRO_TEST_CT 0
-#define aVxworks_Mkdir_MacroTests (tTestDesc*)NULL
+#define VXWORKS_POSIX_MKDIR_TEST_CT 0
+#define aVxworks_Posix_MkdirTests (tTestDesc*)NULL
/*
- * Fix Command Arguments for Vxworks_Mkdir_Macro
+ * Fix Command Arguments for Vxworks_Posix_Mkdir
*/
-static const char* apzVxworks_Mkdir_MacroPatch[] = {
+static const char* apzVxworks_Posix_MkdirPatch[] = {
"format",
- "%0\n\
-#define mkdir(dir, ...) ((void)0, ##__VA_ARGS__, (mkdir)(dir))\n",
+ "extern STATUS mkdir(const char *dir, ...);",
"extern[\t ]+STATUS[\t ]+mkdir[\t ]*\\([\t ]*const[\t ]+char[\t ]*\\*[\t ]*(|[_[:alpha:]][_[:alnum:]]*)\\)[\t ]*;",
(char*)NULL };
VOID_NULL_FIXIDX,
VXWORKS_GCC_PROBLEM_FIXIDX,
VXWORKS_IOCTL_MACRO_FIXIDX,
- VXWORKS_MKDIR_MACRO_FIXIDX,
+ VXWORKS_POSIX_MKDIR_FIXIDX,
VXWORKS_NEEDS_VXTYPES_FIXIDX,
VXWORKS_NEEDS_VXWORKS_FIXIDX,
VXWORKS_REGS_FIXIDX,
VXWORKS_IOCTL_MACRO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aVxworks_Ioctl_MacroTests, apzVxworks_Ioctl_MacroPatch, 0 },
- { zVxworks_Mkdir_MacroName, zVxworks_Mkdir_MacroList,
- apzVxworks_Mkdir_MacroMachs,
- VXWORKS_MKDIR_MACRO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
- aVxworks_Mkdir_MacroTests, apzVxworks_Mkdir_MacroPatch, 0 },
+ { zVxworks_Posix_MkdirName, zVxworks_Posix_MkdirList,
+ apzVxworks_Posix_MkdirMachs,
+ VXWORKS_POSIX_MKDIR_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aVxworks_Posix_MkdirTests, apzVxworks_Posix_MkdirPatch, 0 },
{ zVxworks_Needs_VxtypesName, zVxworks_Needs_VxtypesList,
apzVxworks_Needs_VxtypesMachs,
};
/*
- * Wrap VxWorks mkdir to be posix compliant
+ * mkdir's posix interface expects two arguments. While the RTP VxWorks
+ * API is fine, the kernel version handles only one. We used to expose
+ * a macro and this didn't play nice with uses such as posix:mkdir(x, y)
+ * in libstdc++, so we expose a vararg prototype instead.
*/
fix = {
- hackname = vxworks_mkdir_macro;
+ hackname = vxworks_posix_mkdir;
files = sys/stat.h;
mach = "*-*-vxworks*";
c_fix = format;
- c_fix_arg = "%0\n"
- "#define mkdir(dir, ...) ((void)0, ##__VA_ARGS__, (mkdir)(dir))\n";
+ c_fix_arg = "extern STATUS mkdir(const char *dir, ...);";
c_fix_arg = "extern[\t ]+STATUS[\t ]+mkdir[\t ]*"
"\\([\t ]*const[\t ]+char[\t ]*\\*[\t ]*" /* arg type */
"(|[_[:alpha:]][_[:alnum:]]*)" /* arg name (optional) */
"\\)[\t ]*;";
-
+
test_text = "extern STATUS mkdir (const char * _qwerty) ;";
};