toaruos/base/usr/include/assert.h
2018-10-12 11:15:40 +09:00

15 lines
345 B
C

#pragma once
#include <_cheader.h>
_Begin_C_Header
#ifndef NDEBUG
extern void __assert_func(const char * file, int line, const char * func, const char * failedexpr);
#define assert(statement) ((statement) ? (void)0 : __assert_func(__FILE__, __LINE__, __FUNCTION__, #statement))
#else
#define assert(statement) ((void)0)
#endif
_End_C_Header