Commit | Line | Data |
---|---|---|
39feb7f4 | 1 | /*- |
56559b70 KB |
2 | * Copyright (c) 1992, 1993 |
3 | * The Regents of the University of California. All rights reserved. | |
af8b0f8a KB |
4 | * (c) UNIX System Laboratories, Inc. |
5 | * All or some portions of this file are derived from material licensed | |
6 | * to the University of California by American Telephone and Telegraph | |
7 | * Co. or Unix System Laboratories, Inc. and are reproduced herein with | |
8 | * the permission of UNIX System Laboratories, Inc. | |
39feb7f4 KB |
9 | * |
10 | * %sccs.include.redist.c% | |
11 | * | |
af8b0f8a | 12 | * @(#)assert.h 8.2 (Berkeley) %G% |
39feb7f4 | 13 | */ |
2b4d10ef | 14 | |
f2a5af0d KB |
15 | /* |
16 | * Unlike other ANSI header files, <assert.h> may usefully be included | |
17 | * multiple times, with and without NDEBUG defined. | |
18 | */ | |
19 | ||
20 | #undef assert | |
787937ef | 21 | #undef _assert |
d2b7358e | 22 | |
39feb7f4 | 23 | #ifdef NDEBUG |
f2a5af0d | 24 | #define assert(e) ((void)0) |
cc52bb64 | 25 | #define _assert(e) ((void)0) |
39feb7f4 | 26 | #else |
cc52bb64 | 27 | #define _assert(e) assert(e) |
f2a5af0d KB |
28 | #ifdef __STDC__ |
29 | #define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, #e)) | |
30 | #else /* PCC */ | |
31 | #define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, "e")) | |
39feb7f4 | 32 | #endif |
f2a5af0d KB |
33 | #endif |
34 | ||
35 | #include <sys/cdefs.h> | |
d2b7358e | 36 | |
f2a5af0d KB |
37 | __BEGIN_DECLS |
38 | void __assert __P((const char *, int, const char *)); | |
39 | __END_DECLS |