summaryrefslogtreecommitdiff
path: root/fixincludes
diff options
context:
space:
mode:
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>2018-06-12 16:58:24 +0200
committerJeff Law <law@gcc.gnu.org>2018-06-12 08:58:24 -0600
commitc649ee40c37020bd836a6f91c5b4853bb8a6a07c (patch)
treed2de50033f728c1e9ae5963481be1fcf3949145b /fixincludes
parent9f51da538376188b7ad282ab38d704eed871bd4e (diff)
inclhack.def: Fix fixup for assert.h on vxworks.
* inclhack.def: Fix fixup for assert.h on vxworks. * fixincl.x: Regenerate. From-SVN: r261499
Diffstat (limited to 'fixincludes')
-rw-r--r--fixincludes/ChangeLog5
-rw-r--r--fixincludes/fixincl.x66
-rw-r--r--fixincludes/inclhack.def14
3 files changed, 72 insertions, 13 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index 3d8876721fc..2bb9f89d10b 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,8 @@
+2018-06-12 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
+
+ * inclhack.def: Fix fixup for assert.h on vxworks.
+ * fixincl.x: Regenerate.
+
2018-05-25 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
* inclhack.def (vxworks_iolib_include_unistd): New fix.
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index 9a2dc8b417f..2f7e6fc2443 100644
--- a/fixincludes/fixincl.x
+++ b/fixincludes/fixincl.x
@@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed February 22, 2018 at 03:46:51 PM by AutoGen 5.18
+ * It has been AutoGen-ed June 12, 2018 at 08:56:43 AM by AutoGen 5.18.12
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT SVN-MERGE THIS FILE, EITHER Thu Feb 22 15:46:51 UTC 2018
+/* DO NOT SVN-MERGE THIS FILE, EITHER Tue Jun 12 08:56:43 MDT 2018
*
* 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 249 fixup descriptions.
+ * This file contains 250 fixup descriptions.
*
* See README for more information.
*
@@ -524,11 +524,14 @@ tSCC* apzAab_Vxworks_AssertMachs[] = {
* Fix Command Arguments for Aab_Vxworks_Assert
*/
static const char* apzAab_Vxworks_AssertPatch[] = {
-"#ifndef _ASSERT_H\n\
-#define _ASSERT_H\n\n\
-#ifdef assert\n\
+"#ifdef _ASSERT_H\n\
+#undef _ASSERT_H\n\
#undef assert\n\
#endif\n\n\
+#define _ASSERT_H\n\n\
+#ifdef __cplusplus\n\
+extern \"C\" {\n\
+#endif\n\n\
#if defined(__STDC__) || defined(__cplusplus)\n\
extern void __assert (const char*);\n\
#else\n\
@@ -541,9 +544,11 @@ extern void __assert ();\n\
#define ASSERT_STRINGIFY_HELPER(str) #str\n\n\
#define assert(test) ((void) \\\n\
((test) ? ((void)0) : \\\n\
- __assert(\"Assertion failed: \" ASSERT_STRINGIFY(test) \", file \" \\\n\
+ __assert(\"Assertion failed: \" #test \", file \" \\\n\
__FILE__ \", line \" ASSERT_STRINGIFY(__LINE__) \"\\n\")))\n\n\
#endif\n\n\
+#ifdef __cplusplus\n\
+}\n\
#endif",
(char*)NULL };
@@ -9931,6 +9936,43 @@ static const char* apzVxworks_Write_ConstPatch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * Description of Vxworks_Iolib_Include_Unistd fix
+ */
+tSCC zVxworks_Iolib_Include_UnistdName[] =
+ "vxworks_iolib_include_unistd";
+
+/*
+ * File name selection pattern
+ */
+tSCC zVxworks_Iolib_Include_UnistdList[] =
+ "ioLib.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzVxworks_Iolib_Include_UnistdMachs[] = {
+ "*-*-vxworks*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zVxworks_Iolib_Include_UnistdSelect0[] =
+ "#include \"unistd.h\"";
+
+#define VXWORKS_IOLIB_INCLUDE_UNISTD_TEST_CT 1
+static tTestDesc aVxworks_Iolib_Include_UnistdTests[] = {
+ { TT_EGREP, zVxworks_Iolib_Include_UnistdSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Vxworks_Iolib_Include_Unistd
+ */
+static const char* apzVxworks_Iolib_Include_UnistdPatch[] = {
+ "format",
+ "#include <unistd.h>",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
* Description of X11_Class fix
*/
tSCC zX11_ClassName[] =
@@ -10099,9 +10141,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
-#define REGEX_COUNT 287
+#define REGEX_COUNT 288
#define MACH_LIST_SIZE_LIMIT 187
-#define FIX_COUNT 249
+#define FIX_COUNT 250
/*
* Enumerate the fixes
@@ -10352,6 +10394,7 @@ typedef enum {
VXWORKS_REGS_FIXIDX,
VXWORKS_TIME_FIXIDX,
VXWORKS_WRITE_CONST_FIXIDX,
+ VXWORKS_IOLIB_INCLUDE_UNISTD_FIXIDX,
X11_CLASS_FIXIDX,
X11_CLASS_USAGE_FIXIDX,
X11_NEW_FIXIDX,
@@ -11584,6 +11627,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
VXWORKS_WRITE_CONST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aVxworks_Write_ConstTests, apzVxworks_Write_ConstPatch, 0 },
+ { zVxworks_Iolib_Include_UnistdName, zVxworks_Iolib_Include_UnistdList,
+ apzVxworks_Iolib_Include_UnistdMachs,
+ VXWORKS_IOLIB_INCLUDE_UNISTD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aVxworks_Iolib_Include_UnistdTests, apzVxworks_Iolib_Include_UnistdPatch, 0 },
+
{ zX11_ClassName, zX11_ClassList,
apzX11_ClassMachs,
X11_CLASS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 5ec5a50a2e2..c1f5a13eda4 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -377,11 +377,15 @@ fix = {
mach = "*-*-vxworks*";
replace = <<- _EndOfHeader_
- #ifndef _ASSERT_H
+ #ifdef _ASSERT_H
+ #undef _ASSERT_H
+ #undef assert
+ #endif
+
#define _ASSERT_H
- #ifdef assert
- #undef assert
+ #ifdef __cplusplus
+ extern "C" {
#endif
#if defined(__STDC__) || defined(__cplusplus)
@@ -399,11 +403,13 @@ fix = {
#define assert(test) ((void) \
((test) ? ((void)0) : \
- __assert("Assertion failed: " ASSERT_STRINGIFY(test) ", file " \
+ __assert("Assertion failed: " #test ", file " \
__FILE__ ", line " ASSERT_STRINGIFY(__LINE__) "\n")))
#endif
+ #ifdef __cplusplus
+ }
#endif
_EndOfHeader_;
};