diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-06-15 15:49:32 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-06-15 15:49:32 +0000 |
commit | 7da93d58fdc73c40a721f9f1c7d7a42609e10a53 (patch) | |
tree | e16719bcc03f98a1ed0c211a8d381d029bbfc515 /firmware/include/assert.h | |
parent | 4f58f6197d8aba3ddbb6976521ea9f814ae1738d (diff) | |
download | rockbox-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.h | 20 |
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 @@ | |||
1 | /* | ||
2 | assert.h | ||
3 | */ | ||
4 | |||
5 | #undef assert | ||
6 | |||
7 | #ifdef NDEBUG /* required by ANSI standard */ | ||
8 | #define assert(p) ((void)0) | ||
9 | #else | ||
10 | |||
11 | #ifdef __STDC__ | ||
12 | #define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, #e)) | ||
13 | #else /* PCC */ | ||
14 | #define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, "e")) | ||
15 | #endif | ||
16 | |||
17 | #endif /* NDEBUG */ | ||
18 | |||
19 | void _EXFUN(__assert,(const char *, int, const char *)); | ||
20 | |||