mirror of
https://github.com/pret/agbcc.git
synced 2026-10-22 07:49:29 -05:00
add libc building to agbcc.
This commit is contained in:
29
libc/include/assert.h
Normal file
29
libc/include/assert.h
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
assert.h
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "_ansi.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
|
||||
|
||||
#endif /* NDEBUG */
|
||||
|
||||
void _EXFUN(__assert,(const char *, int, const char *));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user