6502/vbcc/targets/ppc-powerup/include/assert.h
2022-05-12 21:36:39 +09:30

16 lines
296 B
C

#ifndef __ASSERT_H
#define __ASSERT_H 1
#undef assert
extern int __aprintf(const char *,...);
extern void abort(void);
#ifndef NDEBUG
#define assert(exp) ((void)((exp)?0:(__aprintf("Assertion failed: file %s, line %d\n",__FILE__,__LINE__),abort(),0)))
#else
#define assert(exp)
#endif
#endif