summaryrefslogtreecommitdiffstats
path: root/firmware/include/assert.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-06-15 15:49:32 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-06-15 15:49:32 +0000
commit7da93d58fdc73c40a721f9f1c7d7a42609e10a53 (patch)
treee16719bcc03f98a1ed0c211a8d381d029bbfc515 /firmware/include/assert.h
parent4f58f6197d8aba3ddbb6976521ea9f814ae1738d (diff)
downloadrockbox-7da93d58fdc73c40a721f9f1c7d7a42609e10a53.tar.gz
rockbox-7da93d58fdc73c40a721f9f1c7d7a42609e10a53.zip
This is my initial attempt to get rid of the newlib headers requirement,
for gcc built without newlib. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1017 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/include/assert.h')
-rw-r--r--firmware/include/assert.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/firmware/include/assert.h b/firmware/include/assert.h
new file mode 100644
index 0000000000..ba22a9777b
--- /dev/null
+++ b/firmware/include/assert.h
@@ -0,0 +1,20 @@
+/*
+ assert.h
+*/
+
+#undef assert
+
+#ifdef NDEBUG /* required by ANSI standard */
+#define assert(p) ((void)0)
+#else
+
+#ifdef __STDC__
+#define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, #e))
+#else /* PCC */
+#define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, "e"))
+#endif
+
+#endif /* NDEBUG */
+
+void _EXFUN(__assert,(const char *, int, const char *));
+