FENIX_libc/include/assert.h
2020-12-01 17:40:03 -06:00

12 lines
242 B
C

#ifndef _ASSERT_H
#define _ASSERT_H
#include <stdio.h>
#ifdef NDEBUG
#define assert(ignore) ((void) 0)
#else
#define assert(expression) (expression || (fprintf(stderr, "%s: %d: %s", __FILE__, __LINE__, __func__) && abort()))
#endif
#endif