Merge branch 'assert' into 'master'

Make assert more hygienic

See merge request redox-os/relibc!166
This commit is contained in:
jD91mZM2
2018-10-07 12:50:56 +00:00
5 changed files with 37 additions and 14 deletions
+12
View File
@@ -0,0 +1,12 @@
#ifndef _BITS_ASSERT_H
#define _BITS_ASSERT_H
#ifdef NDEBUG
# define assert(cond)
#else
# define assert(cond) if (!(cond)) { \
__assert(__func__, __FILE__, __LINE__, #cond); \
}
#endif
#endif