aboutsummaryrefslogtreecommitdiff
path: root/libc/include/stdlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'libc/include/stdlib.h')
-rw-r--r--libc/include/stdlib.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h
index 49116df..ffe9073 100644
--- a/libc/include/stdlib.h
+++ b/libc/include/stdlib.h
@@ -2,6 +2,7 @@
#define _STDLIB_H_
#include <stddef.h>
+#include <stdio.h>
/* this is by no means standards-compliant... but who cares? :P */
@@ -18,5 +19,8 @@ void srand(unsigned int);
int abs(int);
void *malloc(size_t);
int snprintf(char*, int, const char*, ...);
+void assert_fail(const char*, const char*, int);
+
+#define assert(x) if(!(x))assert_fail(__func__, __FILE__, __LINE__);
#endif