1994-10-27 07:14:23 +03:00
|
|
|
/* $NetBSD: assert.h,v 1.3 1994/10/27 04:21:07 cgd Exp $ */
|
|
|
|
|
1993-08-02 21:48:44 +04:00
|
|
|
/*
|
1993-07-08 20:03:44 +04:00
|
|
|
* source in this file came from
|
|
|
|
* the Mach ethernet boot written by Leendert van Doorn.
|
|
|
|
*
|
|
|
|
* assert.h
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef NDEBUG
|
|
|
|
#define assert(exp) \
|
|
|
|
if (!(exp)) { \
|
|
|
|
printf("Assertion \"%s\" failed: file %s, line %d\n", \
|
|
|
|
#exp, __FILE__, __LINE__); \
|
|
|
|
exit(1); \
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
#define assert(exp) /* */
|
|
|
|
#endif /* _ASSERT_H */
|