Contents of /trunk/mkinitrd-magellan/klibc/usr/include/assert.h
Parent Directory | Revision Log
Revision 1122 -
(show annotations)
(download)
Wed Aug 18 21:11:40 2010 UTC (13 years, 9 months ago) by niro
File MIME type: text/plain
File size: 589 byte(s)
Wed Aug 18 21:11:40 2010 UTC (13 years, 9 months ago) by niro
File MIME type: text/plain
File size: 589 byte(s)
-updated to klibc-1.5.19
1 | /* |
2 | * assert.h |
3 | */ |
4 | |
5 | #ifndef _ASSERT_H |
6 | #define _ASSERT_H |
7 | |
8 | #include <klibc/compiler.h> |
9 | |
10 | #ifdef NDEBUG |
11 | |
12 | /* |
13 | * NDEBUG doesn't just suppress the faulting behavior of assert(), |
14 | * but also all side effects of the assert() argument. This behavior |
15 | * is required by the C standard, and allows the argument to reference |
16 | * variables that are not defined without NDEBUG. |
17 | */ |
18 | #define assert(x) ((void)(0)) |
19 | |
20 | #else |
21 | |
22 | extern __noreturn __assert_fail(const char *, const char *, unsigned int); |
23 | |
24 | #define assert(x) ((x) ? (void)0 : __assert_fail(#x, __FILE__, __LINE__)) |
25 | |
26 | #endif |
27 | |
28 | #endif /* _ASSERT_H */ |