X-Git-Url: https://git.saurik.com/minimal.git/blobdiff_plain/50b825894d028eac1015c3e4d3f974d43eb022d0..a75f8a407c6b2ed309084cac03560d2e932cb9cd:/stdlib.h diff --git a/stdlib.h b/stdlib.h index a9faa14..0f24d7d 100644 --- a/stdlib.h +++ b/stdlib.h @@ -35,6 +35,9 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef MINIMAL_STDLIB_H +#define MINIMAL_STDLIB_H + #define _assert(expr) \ do if (!(expr)) { \ fprintf(stderr, "%s(%u): _assert(%u:%s)\n", __FILE__, __LINE__, errno, #expr); \ @@ -55,12 +58,21 @@ for (;;) #define _trace() \ - printf("_trace(%s:%u)\n", __FILE__, __LINE__) + printf("_trace(%s:%u): %s\n", __FILE__, __LINE__, __FUNCTION__) #define _not(type) \ ((type) ~ (type) 0) +#define _breakpoint() \ + __asm__ { int 0x3 } + +#define _disused \ + __attribute__((unused)) + +#include #include #include #include #include + +#endif/*MINIMAL_STDLIB_H*/