ref: 571ad1d7a83ff20329e7ddb1d080d1882390a2e7
parent: 6c4bf5ed78393449e623638295c2e8f357e5ba54
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Thu Aug 4 12:14:17 EDT 2016
[libc] Fix definition of assert __assert() needs the value of the expression or it will not be able to determine is the assert was correct or not :P
--- a/libc/include/amd64-sysv/assert.h
+++ b/libc/include/amd64-sysv/assert.h
@@ -3,7 +3,7 @@
#define _ASSERT_H
#ifndef NDEBUG
-#define assert(exp) __assert(#exp, __FILE__, __LINE__)
+#define assert(exp) __assert(exp, #exp, __FILE__, __LINE__)
#endif
#endif
--- a/libc/include/i386-sysv/assert.h
+++ b/libc/include/i386-sysv/assert.h
@@ -3,7 +3,7 @@
#define _ASSERT_H
#ifndef NDEBUG
-#define assert(exp) __assert(#exp, __FILE__, __LINE__)
+#define assert(exp) __assert(exp, #exp, __FILE__, __LINE__)
#endif
#endif
--- a/libc/include/qbe/assert.h
+++ b/libc/include/qbe/assert.h
@@ -3,7 +3,7 @@
#define _ASSERT_H
#ifndef NDEBUG
-#define assert(exp) __assert(#exp, __FILE__, __LINE__)
+#define assert(exp) __assert(exp, #exp, __FILE__, __LINE__)
#endif
#endif