xref: /original-bsd/include/assert.h (revision 2932bec8)
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.1 (Berkeley) 04/23/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 #else
20 #ifdef __STDC__
21 #define	assert(e)	((e) ? (void)0 : __assert(__FILE__, __LINE__, #e))
22 #else	/* PCC */
23 #define	assert(e)	((e) ? (void)0 : __assert(__FILE__, __LINE__, "e"))
24 #endif
25 #endif
26 
27 #include <sys/cdefs.h>
28 
29 __BEGIN_DECLS
30 void __assert __P((const char *, int, const char *));
31 __END_DECLS
32