X-Git-Url: https://git.saurik.com/minimal.git/blobdiff_plain/20363569123062b78a4a8942ad0d67ca7ceca355..a75f8a407c6b2ed309084cac03560d2e932cb9cd:/stdlib.h diff --git a/stdlib.h b/stdlib.h index 9610429..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,13 +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*/