diff options
author | Thomas Martitz <kugel@rockbox.org> | 2010-05-06 21:04:40 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2010-05-06 21:04:40 +0000 |
commit | 50a6ca39ad4ed01922aa4f755f0ca579788226cf (patch) | |
tree | c7881b015b220558167310345b162324c96be15a /apps/plugins/doom/rockmacros.h | |
parent | adb506df14aded06ed6e9ebf8540e6fd383ffd6a (diff) | |
download | rockbox-50a6ca39ad4ed01922aa4f755f0ca579788226cf.tar.gz rockbox-50a6ca39ad4ed01922aa4f755f0ca579788226cf.zip |
Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes).
This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/doom/rockmacros.h')
-rw-r--r-- | apps/plugins/doom/rockmacros.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/apps/plugins/doom/rockmacros.h b/apps/plugins/doom/rockmacros.h index e066fe861c..89c943622a 100644 --- a/apps/plugins/doom/rockmacros.h +++ b/apps/plugins/doom/rockmacros.h | |||
@@ -33,9 +33,13 @@ extern bool doomexit; | |||
33 | int printf(const char *fmt, ...); | 33 | int printf(const char *fmt, ...); |
34 | int fileexists(const char * fname); | 34 | int fileexists(const char * fname); |
35 | char *my_strtok( char * s, const char * delim ); | 35 | char *my_strtok( char * s, const char * delim ); |
36 | #undef alloca | ||
36 | #define alloca __builtin_alloca | 37 | #define alloca __builtin_alloca |
37 | #define fdprintf(...) rb->fdprintf(__VA_ARGS__) | 38 | #undef fdprintf |
39 | #define fdprintf(...) rb->fdprintf(__VA_ARGS__) | ||
40 | #undef vsnprintf | ||
38 | #define vsnprintf(...) rb->vsnprintf(__VA_ARGS__) | 41 | #define vsnprintf(...) rb->vsnprintf(__VA_ARGS__) |
42 | #undef read_line | ||
39 | #define read_line(a,b,c) rb->read_line((a),(b),(c)) | 43 | #define read_line(a,b,c) rb->read_line((a),(b),(c)) |
40 | 44 | ||
41 | #ifdef SIMULATOR | 45 | #ifdef SIMULATOR |
@@ -52,19 +56,33 @@ int my_close(int id); | |||
52 | #define filesize(a) rb->filesize((a)) | 56 | #define filesize(a) rb->filesize((a)) |
53 | #define read(a,b,c) rb->read((a),(b),(c)) | 57 | #define read(a,b,c) rb->read((a),(b),(c)) |
54 | #define write(a,b,c) rb->write((a),(b),(c)) | 58 | #define write(a,b,c) rb->write((a),(b),(c)) |
59 | #undef strtok | ||
55 | #define strtok(a,b) my_strtok((a),(b)) | 60 | #define strtok(a,b) my_strtok((a),(b)) |
61 | #undef strcat | ||
56 | #define strcat(a,b) rb->strcat((a),(b)) | 62 | #define strcat(a,b) rb->strcat((a),(b)) |
63 | #undef memset | ||
57 | #define memset(a,b,c) rb->memset((a),(b),(c)) | 64 | #define memset(a,b,c) rb->memset((a),(b),(c)) |
65 | #undef memmove | ||
58 | #define memmove(a,b,c) rb->memmove((a),(b),(c)) | 66 | #define memmove(a,b,c) rb->memmove((a),(b),(c)) |
67 | #undef memcmp | ||
59 | #define memcmp(a,b,c) rb->memcmp((a),(b),(c)) | 68 | #define memcmp(a,b,c) rb->memcmp((a),(b),(c)) |
69 | #undef memchr | ||
60 | #define memchr(a,b,c) rb->memchr((a),(b),(c)) | 70 | #define memchr(a,b,c) rb->memchr((a),(b),(c)) |
71 | #undef strcpy | ||
61 | #define strcpy(a,b) rb->strcpy((a),(b)) | 72 | #define strcpy(a,b) rb->strcpy((a),(b)) |
73 | #undef strlen | ||
62 | #define strlen(a) rb->strlen((a)) | 74 | #define strlen(a) rb->strlen((a)) |
75 | #undef strcmp | ||
63 | #define strcmp(a,b) rb->strcmp((a),(b)) | 76 | #define strcmp(a,b) rb->strcmp((a),(b)) |
77 | #undef strncmp | ||
64 | #define strncmp(a,b,c) rb->strncmp((a),(b),(c)) | 78 | #define strncmp(a,b,c) rb->strncmp((a),(b),(c)) |
79 | #undef strchr | ||
65 | #define strchr(a,b) rb->strchr((a),(b)) | 80 | #define strchr(a,b) rb->strchr((a),(b)) |
81 | #undef strrchr | ||
66 | #define strrchr(a,b) rb->strrchr((a),(b)) | 82 | #define strrchr(a,b) rb->strrchr((a),(b)) |
83 | #undef strcasecmp | ||
67 | #define strcasecmp(a,b) rb->strcasecmp((a),(b)) | 84 | #define strcasecmp(a,b) rb->strcasecmp((a),(b)) |
85 | #undef strncasecmp | ||
68 | #define strncasecmp(a,b,c) rb->strncasecmp((a),(b),(c)) | 86 | #define strncasecmp(a,b,c) rb->strncasecmp((a),(b),(c)) |
69 | #define srand(a) rb->srand((a)) | 87 | #define srand(a) rb->srand((a)) |
70 | #define rand() rb->rand() | 88 | #define rand() rb->rand() |