[hackers] [scc] [libc] Fix definition of assert || Roberto E. Vargas Caballero
commit 4224b2666c38f74d0e02787005572d66a4ad3607
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Thu Aug 4 16:14:17 2016 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Wed Aug 10 15:18:32 2016 +0200
[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
diff --git a/libc/include/amd64-sysv/assert.h b/libc/include/amd64-sysv/assert.h
index 339c7aa..1d9eadb 100644
--- a/libc/include/amd64-sysv/assert.h
+++ b/libc/include/amd64-sysv/assert.h
_AT_@ -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
diff --git a/libc/include/i386-sysv/assert.h b/libc/include/i386-sysv/assert.h
index 339c7aa..1d9eadb 100644
--- a/libc/include/i386-sysv/assert.h
+++ b/libc/include/i386-sysv/assert.h
_AT_@ -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
diff --git a/libc/include/qbe/assert.h b/libc/include/qbe/assert.h
index 339c7aa..1d9eadb 100644
--- a/libc/include/qbe/assert.h
+++ b/libc/include/qbe/assert.h
_AT_@ -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
Received on Wed Aug 10 2016 - 15:18:58 CEST
This archive was generated by hypermail 2.3.0
: Wed Aug 10 2016 - 15:24:19 CEST