2017-10-21 23:40:19 +00:00
|
|
|
/****************************************************************
|
|
|
|
*
|
|
|
|
* assert.h - debugging facilities
|
|
|
|
*
|
|
|
|
* February 1989
|
|
|
|
* Mike Westerfield
|
|
|
|
*
|
|
|
|
* Copyright 1989,1990, 1996
|
|
|
|
* Byte Works, Inc.
|
|
|
|
*
|
|
|
|
****************************************************************/
|
|
|
|
|
|
|
|
#ifdef assert
|
|
|
|
#undef assert
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef NDEBUG
|
2021-08-24 23:35:01 +00:00
|
|
|
#ifndef __GNO__
|
|
|
|
#define assert(expression) (expression) ? ((void) 0) : (__assert2(__FILE__, __LINE__, __func__, #expression))
|
|
|
|
#else
|
2017-10-21 23:40:19 +00:00
|
|
|
#define assert(expression) (expression) ? ((void) 0) : (__assert(__FILE__, __LINE__, #expression))
|
2021-08-24 23:35:01 +00:00
|
|
|
#endif
|
2017-10-21 23:40:19 +00:00
|
|
|
#else
|
2021-08-24 23:35:01 +00:00
|
|
|
#define assert(expression) ((void)0)
|
2017-10-21 23:40:19 +00:00
|
|
|
#endif
|
2020-01-04 06:59:23 +00:00
|
|
|
|
|
|
|
#ifndef __assert__
|
|
|
|
#define __assert__
|
|
|
|
|
2021-08-24 23:35:01 +00:00
|
|
|
extern void __assert(const char *, unsigned, const char *);
|
|
|
|
extern void __assert2(const char *, unsigned, const char *, const char *);
|
2020-01-04 06:59:23 +00:00
|
|
|
|
|
|
|
#define static_assert _Static_assert
|
|
|
|
|
|
|
|
#endif
|