xref: /original-bsd/include/assert.h (revision 68d9582f)
1 /*-
2  * Copyright (c) 1992 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)assert.h	5.2 (Berkeley) 06/18/92
8  */
9 
10 /*
11  * Unlike other ANSI header files, <assert.h> may usefully be included
12  * multiple times, with and without NDEBUG defined.
13  */
14 
15 #undef assert
16 
17 #ifdef NDEBUG
18 #define	assert(e)	((void)0)
19 #define	_assert(e)	((void)0)
20 #else
21 #define	_assert(e)	assert(e)
22 #ifdef __STDC__
23 #define	assert(e)	((e) ? (void)0 : __assert(__FILE__, __LINE__, #e))
24 #else	/* PCC */
25 #define	assert(e)	((e) ? (void)0 : __assert(__FILE__, __LINE__, "e"))
26 #endif
27 #endif
28 
29 #include <sys/cdefs.h>
30 
31 __BEGIN_DECLS
32 void __assert __P((const char *, int, const char *));
33 __END_DECLS
34