5 /* 7.2 Diagnostics <assert.h>
7 This file is part of the Public Domain C Library (PDCLib).
8 Permission is granted to use, modify, and / or redistribute at will.
12 #define _PDCLIB_AUX_H _PDCLIB_AUX_H
13 #include <_PDCLIB_aux.h>
16 #ifndef _PDCLIB_CONFIG_H
17 #define _PDCLIB_CONFIG_H _PDCLIB_CONFIG_H
18 #include <_PDCLIB_config.h>
21 #ifndef _PDCLIB_ASSERT_H
22 #define _PDCLIB_ASSERT_H _PDCLIB_ASSERT_H
23 #if _PDCLIB_C_VERSION == 99
24 void _PDCLIB_assert( char const * const, char const * const, char const * const );
26 void _PDCLIB_assert( char const * const );
30 /* If NDEBUG is set, assert() is a null operation. */
34 #define assert( ignore ) ( (void) 0 )
36 #if _PDCLIB_C_VERSION == 99
37 #define assert( expression ) ( ( expression ) ? (void) 0 \
38 : _PDCLIB_assert( "Assertion failed: " #expression \
39 ", function ", __func__, \
41 ", line " _PDCLIB_symbol2string( __LINE__ ) \
44 #define assert( expression ) ( ( expression ) ? (void) 0 \
45 : _PDCLIB_assert( "Assertion failed: " #expression \
47 ", line " _PDCLIB_symbol2string( __LINE__ ) \