diff options
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r-- | fixincludes/inclhack.def | 14 |
1 files changed, 10 insertions, 4 deletions
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_; }; |