Search
lxdream.org :: lxdream/test/include/assert.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename test/include/assert.h
changeset 185:6755a04c447f
author nkeynes
date Sun Oct 07 06:27:12 2007 +0000 (16 years ago)
permissions -rw-r--r--
last change Fix compilation warnings
file annotate diff log raw
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/test/include/assert.h Sun Oct 07 06:27:12 2007 +0000
1.3 @@ -0,0 +1,29 @@
1.4 +/*
1.5 + assert.h
1.6 +*/
1.7 +
1.8 +#ifdef __cplusplus
1.9 +extern "C" {
1.10 +#endif
1.11 +
1.12 +#include "_ansi.h"
1.13 +
1.14 +#undef assert
1.15 +
1.16 +#ifdef NDEBUG /* required by ANSI standard */
1.17 +#define assert(p) ((void)0)
1.18 +#else
1.19 +
1.20 +#ifdef __STDC__
1.21 +#define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, #e))
1.22 +#else /* PCC */
1.23 +#define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, "e"))
1.24 +#endif
1.25 +
1.26 +#endif /* NDEBUG */
1.27 +
1.28 +void _EXFUN(__assert,(const char *, int, const char *));
1.29 +
1.30 +#ifdef __cplusplus
1.31 +}
1.32 +#endif
.