/* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ /* bos72X src/bos/usr/include/assert.h 1.17.1.7 */ /* */ /* Licensed Materials - Property of IBM */ /* */ /* COPYRIGHT International Business Machines Corp. 1988,2021 */ /* All Rights Reserved */ /* */ /* US Government Users Restricted Rights - Use, duplication or */ /* disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ /* */ /* IBM_PROLOG_END_TAG */ /* @(#)34 1.17.1.7 src/bos/usr/include/assert.h, sysdb, bos72X, x2021_25A9 6/4/21 03:15:17 */ /* * COMPONENT_NAME: (SYSDB) Kernel Debugger * * FUNCTIONS: * * ORIGINS: 27 * */ /* * * The ANSI standard requires that certain values be in assert.h. * It also requires that if _ANSI_C_SOURCE is defined then ONLY these * values are present. This header includes all ANSI required entries. * */ #undef assert #ifdef NDEBUG #define assert(ignore) ((void)0) #else #include #include #ifdef _NO_PROTO #ifndef __cplusplus extern _NOTHROW(_NORETURN(void, __assert), ()); extern _NOTHROW(_NORETURN(void, __assert_c99), ()); #else extern "C" _NOTHROW(_NORETURN(void, __assert), ()); extern "C" _NOTHROW(_NORETURN(void, __assert_c99), ()); #endif /* __cplusplus */ #else #ifndef __cplusplus extern _NOTHROW(_NORETURN(void, __assert), (const char *, const char *, int)); extern _NOTHROW(_NORETURN(void, __assert_c99), (const char *, const char *, int, const char *)); #else extern "C" _NOTHROW(_NORETURN(void, __assert), (const char *, const char *, int)); extern "C" _NOTHROW(_NORETURN(void, __assert_c99), (const char *, const char *, int, const char *)); #endif /* __cplusplus */ #endif /* _NO_PROTO */ /* * Determine when the assert macro defined with C99 and SUSV3 * can be exposed: * - Only if __NO_ASSERT_C99 and _NOISOC99_SOURCE has not been defined * - Only if this is a C99 capable compiler. * - If ALL_SOURCE not defined and either _POSIX_C_SOURCE is not * defined or defined as at least as new as 2001 */ #if !defined(__NO_ASSERT_C99) && !defined(_NOISOC99_SOURCE) #if __STDC_VERSION__ < 199901L && \ !(defined(__C99__FUNC__) || \ (defined(__GNUC__) && (!defined(__xlC__) || defined(__ibmxl__)))) #undef __ASSERT_C99 #else #if !defined(_ALL_SOURCE) && (!defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE >= 200112L) #define __ASSERT_C99 #endif #endif #endif #if defined(__GNUC__) && (!defined(__xlC__) || defined(__ibmxl__)) #define __ASSERT_C99__FUNC__ __extension__ __PRETTY_FUNCTION__ #else #define __ASSERT_C99__FUNC__ __func__ #endif #if defined(__ASSERT_C99) #if __STDC__ == 1 || defined(__cplusplus) && !defined(__IBMCPP__) #define assert(__EX) ((__EX) ? ((void)0) : __assert_c99(# __EX, __FILE__, __LINE__, __ASSERT_C99__FUNC__)) #else #define assert(__EX) ((__EX) ? ((void)0) : __assert_c99("__EX", __FILE__, __LINE__, __ASSERT_C99__FUNC__)) #endif /* __STDC__ || __cplusplus */ #else /* else if __ASSERT_C99 not defined */ #if __STDC__ == 1 || defined(__cplusplus) && !defined(__IBMCPP__) #define assert(__EX) ((__EX) ? ((void)0) : __assert(# __EX, __FILE__, __LINE__)) #else #define assert(__EX) ((__EX) ? ((void)0) : __assert("__EX", __FILE__, __LINE__)) #endif /* __STDC__ || __cplusplus */ #endif /* __ASSERT_C99 */ #endif /* NDEBUG */ #ifndef __cplusplus /*ISO C standard from 2011 onward*/ #if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) || defined(_ALL_SOURCE) #undef static_assert #define static_assert _Static_assert #endif #endif /* !__cplusplus */