LibC: Allow including assert.h multiple times
Some shit seems to depend on this
This commit is contained in:
parent
82d5d9ba58
commit
e01e35713b
|
|
@ -1,3 +1,11 @@
|
|||
#ifndef assert
|
||||
#ifdef NDEBUG
|
||||
#define assert(ignore) ((void)0)
|
||||
#else
|
||||
#define assert(expr) ((expr) ? (void)0 : __assert_fail(#expr, __FILE__, __LINE__, __func__))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _ASSERT_H
|
||||
#define _ASSERT_H 1
|
||||
|
||||
|
|
@ -5,12 +13,6 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define assert(ignore) ((void)0)
|
||||
#else
|
||||
#define assert(expr) ((expr) ? (void)0 : __assert_fail(#expr, __FILE__, __LINE__, __func__))
|
||||
#endif
|
||||
|
||||
#if !defined(__cplusplus) && __STDC_VERSION__ >= 201112L && __STDC_VERSION__ < 202311L
|
||||
#define static_assert _Static_assert
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue