diff options
Diffstat (limited to 'apps/plugins/doom')
-rw-r--r-- | apps/plugins/doom/d_deh.c | 2 | ||||
-rw-r--r-- | apps/plugins/doom/doom.make | 2 | ||||
-rw-r--r-- | apps/plugins/doom/rockmacros.h | 20 |
3 files changed, 21 insertions, 3 deletions
diff --git a/apps/plugins/doom/d_deh.c b/apps/plugins/doom/d_deh.c index d3f7496885..82426c1bab 100644 --- a/apps/plugins/doom/d_deh.c +++ b/apps/plugins/doom/d_deh.c | |||
@@ -44,7 +44,7 @@ | |||
44 | #include "d_think.h" | 44 | #include "d_think.h" |
45 | #include "w_wad.h" | 45 | #include "w_wad.h" |
46 | 46 | ||
47 | #include "sscanf.h" | 47 | #include <stdio.h> /* sscanf */ |
48 | #include "rockmacros.h" | 48 | #include "rockmacros.h" |
49 | 49 | ||
50 | #define TRUE 1 | 50 | #define TRUE 1 |
diff --git a/apps/plugins/doom/doom.make b/apps/plugins/doom/doom.make index bdc32230eb..54a63eb707 100644 --- a/apps/plugins/doom/doom.make +++ b/apps/plugins/doom/doom.make | |||
@@ -13,7 +13,7 @@ DOOMBUILDDIR := $(BUILDDIR)/apps/plugins/doom | |||
13 | ROCKS += $(DOOMBUILDDIR)/doom.rock | 13 | ROCKS += $(DOOMBUILDDIR)/doom.rock |
14 | 14 | ||
15 | DOOM_SRC := $(call preprocess, $(DOOMSRCDIR)/SOURCES) | 15 | DOOM_SRC := $(call preprocess, $(DOOMSRCDIR)/SOURCES) |
16 | DOOM_SRC += $(ROOTDIR)/firmware/common/sscanf.c | 16 | DOOM_SRC += $(ROOTDIR)/firmware/libc/sscanf.c |
17 | DOOM_OBJ := $(call c2obj, $(DOOM_SRC)) | 17 | DOOM_OBJ := $(call c2obj, $(DOOM_SRC)) |
18 | 18 | ||
19 | # add source files to OTHER_SRC to get automatic dependencies | 19 | # add source files to OTHER_SRC to get automatic dependencies |
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() |