commit 50a4ad2d4feb63a231fffbe2d3cf7958052ae1f4
parent dabd4e4777ed3de63147b169229d5e3d262069b8
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Fri, 15 Dec 2017 16:15:35 +0000
[lib/c] Fix assert.h
According to C99 standard (section 7.2) the assert
macro shall be redefined each time assert.h gets
included depending on the status of NDEBUG macro.
Diffstat:
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/lib/c/include/assert.h b/lib/c/include/assert.h
@@ -1,12 +1,10 @@
-#ifndef _ASSERT_H
-#define _ASSERT_H
void __assert(char *exp, char *file, long line);
+#undef assert
#ifndef NDEBUG
# define assert(exp) ((exp) ? (void) 0 : __assert(#exp, __FILE__, __LINE__))
#else
# define assert(exp) ((void)0)
#endif
-#endif