Initial revision
This commit is contained in:
parent
8950c32d5e
commit
9ff348b675
11
include/_tail_cc/assert.h
Normal file
11
include/_tail_cc/assert.h
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
/* $Header$ */
|
||||||
|
/* A S S E R T I O N M A C R O D E F I N I T I O N */
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
|
/* Note: this macro uses parameter substitution inside strings */
|
||||||
|
#define assert(exp) (exp || (fprintf(stderr,"Assertion \"%s\" failed: file %s, line %d\n", "exp", __FILE__, __LINE__), exit(1)))
|
||||||
|
#define _assert(exp) (exp || (fprintf(stderr,"Assertion \"%s\" failed: file %s, line %d\n", "exp", __FILE__, __LINE__), exit(1)))
|
||||||
|
#else
|
||||||
|
#define assert(exp) (1)
|
||||||
|
#define _assert(exp) (1)
|
||||||
|
#endif NDEBUG
|
||||||
Loading…
x
Reference in New Issue
Block a user