mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-07-10 13:29:52 -04:00
libc: fix firmware assert.h
Change-Id: Id7cc3e4656519fee908083d3b551c5228d220ef7
This commit is contained in:
parent
db32a7f07e
commit
7d3f738b3f
1 changed files with 2 additions and 10 deletions
|
|
@ -2,21 +2,13 @@
|
|||
assert.h
|
||||
*/
|
||||
|
||||
#include "_ansi.h"
|
||||
#include <panic.h>
|
||||
|
||||
#undef assert
|
||||
|
||||
#ifdef NDEBUG /* required by ANSI standard */
|
||||
#define assert(p) ((void)0)
|
||||
#else
|
||||
|
||||
#ifdef __STDC__
|
||||
#define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, #e))
|
||||
#else /* PCC */
|
||||
#define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, "e"))
|
||||
#endif
|
||||
|
||||
#define assert(e) ((e) ? (void)0 : panicf("Assertion failed: %s (%s: %s: %d)", #e, __FILE__, __func__, __LINE__))
|
||||
#endif /* NDEBUG */
|
||||
|
||||
void _EXFUN(__assert,(const char *, int, const char *));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue