assert.h (85605) | assert.h (93032) |
---|---|
1/*- 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 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. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)assert.h 8.2 (Berkeley) 1/21/94 | 1/*- 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 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. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)assert.h 8.2 (Berkeley) 1/21/94 |
39 * $FreeBSD: head/include/assert.h 85605 2001-10-27 19:37:20Z mike $ | 39 * $FreeBSD: head/include/assert.h 93032 2002-03-23 17:24:55Z imp $ |
40 */ 41 42#include <sys/cdefs.h> 43 44/* 45 * Unlike other ANSI header files, <assert.h> may usefully be included 46 * multiple times, with and without NDEBUG defined. 47 */ 48 49#undef assert 50#undef _assert 51 52#ifdef NDEBUG 53#define assert(e) ((void)0) 54#define _assert(e) ((void)0) 55#else 56#define _assert(e) assert(e) 57 | 40 */ 41 42#include <sys/cdefs.h> 43 44/* 45 * Unlike other ANSI header files, <assert.h> may usefully be included 46 * multiple times, with and without NDEBUG defined. 47 */ 48 49#undef assert 50#undef _assert 51 52#ifdef NDEBUG 53#define assert(e) ((void)0) 54#define _assert(e) ((void)0) 55#else 56#define _assert(e) assert(e) 57 |
58#ifdef __STDC__ | |
59#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \ 60 __LINE__, #e)) | 58#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \ 59 __LINE__, #e)) |
61#else /* !__STDC__ */ 62#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \ 63 __LINE__, "e")) 64#endif /* __STDC__ */ | |
65#endif /* NDEBUG */ 66 67__BEGIN_DECLS | 60#endif /* NDEBUG */ 61 62__BEGIN_DECLS |
68void __assert __P((const char *, const char *, int, const char *)); | 63void __assert(const char *, const char *, int, const char *); |
69__END_DECLS | 64__END_DECLS |