Commit c649ee40 by Rasmus Villemoes Committed by Jeff Law

inclhack.def: Fix fixup for assert.h on vxworks.

	* inclhack.def: Fix fixup for assert.h on vxworks.
	* fixincl.x: Regenerate.

From-SVN: r261499
parent 9f51da53
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> 2018-05-25 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
* inclhack.def (vxworks_iolib_include_unistd): New fix. * inclhack.def (vxworks_iolib_include_unistd): New fix.
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
* *
* DO NOT EDIT THIS FILE (fixincl.x) * 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 * From the definitions inclhack.def
* and the template file fixincl * 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. * You must regenerate it. Use the ./genfixes script.
* *
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* certain ANSI-incompatible system header files which are fixed to work * 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. * 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. * See README for more information.
* *
...@@ -524,11 +524,14 @@ tSCC* apzAab_Vxworks_AssertMachs[] = { ...@@ -524,11 +524,14 @@ tSCC* apzAab_Vxworks_AssertMachs[] = {
* Fix Command Arguments for Aab_Vxworks_Assert * Fix Command Arguments for Aab_Vxworks_Assert
*/ */
static const char* apzAab_Vxworks_AssertPatch[] = { static const char* apzAab_Vxworks_AssertPatch[] = {
"#ifndef _ASSERT_H\n\ "#ifdef _ASSERT_H\n\
#define _ASSERT_H\n\n\ #undef _ASSERT_H\n\
#ifdef assert\n\
#undef assert\n\ #undef assert\n\
#endif\n\n\ #endif\n\n\
#define _ASSERT_H\n\n\
#ifdef __cplusplus\n\
extern \"C\" {\n\
#endif\n\n\
#if defined(__STDC__) || defined(__cplusplus)\n\ #if defined(__STDC__) || defined(__cplusplus)\n\
extern void __assert (const char*);\n\ extern void __assert (const char*);\n\
#else\n\ #else\n\
...@@ -541,9 +544,11 @@ extern void __assert ();\n\ ...@@ -541,9 +544,11 @@ extern void __assert ();\n\
#define ASSERT_STRINGIFY_HELPER(str) #str\n\n\ #define ASSERT_STRINGIFY_HELPER(str) #str\n\n\
#define assert(test) ((void) \\\n\ #define assert(test) ((void) \\\n\
((test) ? ((void)0) : \\\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\ __FILE__ \", line \" ASSERT_STRINGIFY(__LINE__) \"\\n\")))\n\n\
#endif\n\n\ #endif\n\n\
#ifdef __cplusplus\n\
}\n\
#endif", #endif",
(char*)NULL }; (char*)NULL };
...@@ -9931,6 +9936,43 @@ static const char* apzVxworks_Write_ConstPatch[] = { ...@@ -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 * Description of X11_Class fix
*/ */
tSCC zX11_ClassName[] = tSCC zX11_ClassName[] =
...@@ -10099,9 +10141,9 @@ static const char* apzX11_SprintfPatch[] = { ...@@ -10099,9 +10141,9 @@ static const char* apzX11_SprintfPatch[] = {
* *
* List of all fixes * List of all fixes
*/ */
#define REGEX_COUNT 287 #define REGEX_COUNT 288
#define MACH_LIST_SIZE_LIMIT 187 #define MACH_LIST_SIZE_LIMIT 187
#define FIX_COUNT 249 #define FIX_COUNT 250
/* /*
* Enumerate the fixes * Enumerate the fixes
...@@ -10352,6 +10394,7 @@ typedef enum { ...@@ -10352,6 +10394,7 @@ typedef enum {
VXWORKS_REGS_FIXIDX, VXWORKS_REGS_FIXIDX,
VXWORKS_TIME_FIXIDX, VXWORKS_TIME_FIXIDX,
VXWORKS_WRITE_CONST_FIXIDX, VXWORKS_WRITE_CONST_FIXIDX,
VXWORKS_IOLIB_INCLUDE_UNISTD_FIXIDX,
X11_CLASS_FIXIDX, X11_CLASS_FIXIDX,
X11_CLASS_USAGE_FIXIDX, X11_CLASS_USAGE_FIXIDX,
X11_NEW_FIXIDX, X11_NEW_FIXIDX,
...@@ -11584,6 +11627,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ...@@ -11584,6 +11627,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
VXWORKS_WRITE_CONST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, VXWORKS_WRITE_CONST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aVxworks_Write_ConstTests, apzVxworks_Write_ConstPatch, 0 }, 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, { zX11_ClassName, zX11_ClassList,
apzX11_ClassMachs, apzX11_ClassMachs,
X11_CLASS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, X11_CLASS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
......
...@@ -377,11 +377,15 @@ fix = { ...@@ -377,11 +377,15 @@ fix = {
mach = "*-*-vxworks*"; mach = "*-*-vxworks*";
replace = <<- _EndOfHeader_ replace = <<- _EndOfHeader_
#ifndef _ASSERT_H #ifdef _ASSERT_H
#undef _ASSERT_H
#undef assert
#endif
#define _ASSERT_H #define _ASSERT_H
#ifdef assert #ifdef __cplusplus
#undef assert extern "C" {
#endif #endif
#if defined(__STDC__) || defined(__cplusplus) #if defined(__STDC__) || defined(__cplusplus)
...@@ -399,11 +403,13 @@ fix = { ...@@ -399,11 +403,13 @@ fix = {
#define assert(test) ((void) \ #define assert(test) ((void) \
((test) ? ((void)0) : \ ((test) ? ((void)0) : \
__assert("Assertion failed: " ASSERT_STRINGIFY(test) ", file " \ __assert("Assertion failed: " #test ", file " \
__FILE__ ", line " ASSERT_STRINGIFY(__LINE__) "\n"))) __FILE__ ", line " ASSERT_STRINGIFY(__LINE__) "\n")))
#endif #endif
#ifdef __cplusplus
}
#endif #endif
_EndOfHeader_; _EndOfHeader_;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment