summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/include/assert.h
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/dietlibc/include/assert.h')
-rw-r--r--mdk-stage1/dietlibc/include/assert.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/mdk-stage1/dietlibc/include/assert.h b/mdk-stage1/dietlibc/include/assert.h
index b135369b8..a8ce3ce87 100644
--- a/mdk-stage1/dietlibc/include/assert.h
+++ b/mdk-stage1/dietlibc/include/assert.h
@@ -22,10 +22,17 @@ extern void __assert_fail (const char *__assertion, const char *__file,
#ifdef NDEBUG
#define assert(expr)
#else
+#ifdef expect
+# define assert(expr) \
+ ((void) (expect((long)(expr),0) ? 0 : \
+ (__assert_fail (#expr, \
+ __FILE__, __LINE__, __ASSERT_FUNCTION), 0)))
+#else
# define assert(expr) \
((void) ((expr) ? 0 : \
(__assert_fail (#expr, \
__FILE__, __LINE__, __ASSERT_FUNCTION), 0)))
#endif
+#endif
#endif