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

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

From-SVN: r261499
This commit is contained in:
Rasmus Villemoes 2018-06-12 16:58:24 +02:00 committed by Jeff Law
parent 9f51da5383
commit c649ee40c3
3 changed files with 72 additions and 13 deletions

View File

@ -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.

View File

@ -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 };
@ -9929,6 +9934,43 @@ static const char* apzVxworks_Write_ConstPatch[] = {
"extern[\t ]+int[\t ]+write[\t ]*\\([\t ]*int[\t ]*,[\t ]*char[\t ]*\\*[\t ]*,[\t ]*size_t[\t ]*\\)[\t ]*;",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* 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
@ -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,

View File

@ -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_;
};