ref: 79d018693743069006282ff218eb85acc3c7ee2b
parent: 802fc685de68e0b4ef93de81a8270f9b3642085b
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Dec 15 11:15:35 EST 2017
[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.
--- a/lib/c/include/assert.h
+++ b/lib/c/include/assert.h
@@ -1,8 +1,7 @@
-#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
@@ -9,4 +8,3 @@
# define assert(exp) ((void)0)
#endif
-#endif