From 0d9daaa18d191877b8ede30fd20a425b5d7144c3 Mon Sep 17 00:00:00 2001 From: ceriel Date: Fri, 21 Oct 1988 17:34:20 +0000 Subject: [PATCH] changed assert macro to also work with ANSI C compilers --- modules/src/assert/assert.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/src/assert/assert.h b/modules/src/assert/assert.h index 424953a4f..bd03d737a 100644 --- a/modules/src/assert/assert.h +++ b/modules/src/assert/assert.h @@ -7,7 +7,11 @@ #ifdef DEBUG /* Note: this macro uses parameter substitution inside strings */ +#ifdef __STDC__ +#define assert(exp) (exp || _BadAssertion(__FILE__, __LINE__, #exp)) +#else #define assert(exp) (exp || _BadAssertion(__FILE__, __LINE__, "exp")) +#endif #else #define assert(exp) (1) #endif DEBUG