From 0e14c471820d4a44b372e4e1c9248b39f65e23c4 Mon Sep 17 00:00:00 2001
From: rbmj <rbmj@verizon.net>
Date: Sat, 23 Jun 2012 17:38:41 -0400
Subject: [PATCH] Added vxworks_mkdir_macro fix.
This adds a macro to POSIX-ify VxWorks' mkdir() function by
including a macro that wraps the function and takes an (ignored,
but still evaluated) mode argument.
Modified:
*fixincludes/inclhack.def (vxworks_mkdir_macro): add hack
*fixincludes/fixincl.x: Regenerate
---
fixincludes/inclhack.def | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
@@ -4488,6 +4488,27 @@ fix = {
test_text = "extern int ioctl ( int asdf1234, int jkl , int qwerty ) ;";
};
+/*
+ * Wrap VxWorks mkdir to be posix compliant
+ */
+fix = {
+ hackname = vxworks_mkdir_macro;
+ files = sys/stat.h;
+ mach = "*-*-vxworks*";
+
+ c_fix = format;
+ c_fix_arg = "%0\n"
+ "#ifdef IN_GCC\n"
+ "#define mkdir(dir, mode) ((mode), (mkdir)(dir))\n"
+ "#endif\n";
+ 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) ;";
+};
+
/*
* Fix VxWorks <time.h> to not require including <vxTypes.h>.
--
1.7.5.4