public
/
ack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
416020b
)
changed assert macro to also work with ANSI C compilers
author
ceriel
<none@none>
Fri, 21 Oct 1988 17:34:20 +0000
(17:34 +0000)
committer
ceriel
<none@none>
Fri, 21 Oct 1988 17:34:20 +0000
(17:34 +0000)
modules/src/assert/assert.h
patch
|
blob
|
history
diff --git
a/modules/src/assert/assert.h
b/modules/src/assert/assert.h
index
424953a
..
bd03d73
100644
(file)
--- 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