diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2021-03-04 08:59:17 -0500 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-03-04 14:14:33 +0000 |
commit | 2628155fc9947dcf463938553f057c39ccc2227a (patch) | |
tree | 2f852f1668c5ed94d86ea53ad89c646884490044 | |
parent | 15b4d229139d2f596ba18ca3331f0ce9c7134cb4 (diff) | |
download | rockbox-2628155fc9947dcf463938553f057c39ccc2227a.tar.gz rockbox-2628155fc9947dcf463938553f057c39ccc2227a.zip |
Clean up places that use #if defined(CPU_ARM | CPU_COLDFIRE | CPU_MIPS)
Since that encompasses _all_ of our native targets in a post-archos world,
either replace it with #if (CONFIG_PLATFORM & PLATFORM_NATIVE) or
delete it altogher as appropriate.
Change-Id: I9128a456e850d5c96a9e05806aad3acd923f90c5
-rw-r--r-- | firmware/rolo.c | 3 | ||||
-rw-r--r-- | lib/rbcodec/codecs/libtremor/oggmalloc.c | 8 | ||||
-rw-r--r-- | lib/rbcodec/codecs/vorbis.c | 6 |
3 files changed, 8 insertions, 9 deletions
diff --git a/firmware/rolo.c b/firmware/rolo.c index 5cc4f1d212..f4db832b2b 100644 --- a/firmware/rolo.c +++ b/firmware/rolo.c | |||
@@ -219,7 +219,6 @@ extern unsigned long loadaddress; | |||
219 | * Filename must be a fully defined filename including the path and extension | 219 | * Filename must be a fully defined filename including the path and extension |
220 | * | 220 | * |
221 | ***************************************************************************/ | 221 | ***************************************************************************/ |
222 | #if defined(CPU_COLDFIRE) || defined(CPU_ARM) || defined(CPU_MIPS) | ||
223 | int rolo_load(const char* filename) | 222 | int rolo_load(const char* filename) |
224 | { | 223 | { |
225 | unsigned char* ramstart = (void*)&loadaddress; | 224 | unsigned char* ramstart = (void*)&loadaddress; |
@@ -323,7 +322,7 @@ int rolo_load(const char* filename) | |||
323 | /* never reached */ | 322 | /* never reached */ |
324 | return 0; | 323 | return 0; |
325 | } | 324 | } |
326 | #endif /* CPU_COLDFIRE | CPU_ARM | CPU_MIPS */ | 325 | |
327 | #else /* !defined(IRIVER_IFP7XX_SERIES) */ | 326 | #else /* !defined(IRIVER_IFP7XX_SERIES) */ |
328 | int rolo_load(const char* filename) | 327 | int rolo_load(const char* filename) |
329 | { | 328 | { |
diff --git a/lib/rbcodec/codecs/libtremor/oggmalloc.c b/lib/rbcodec/codecs/libtremor/oggmalloc.c index 783e0f7240..31d88f191d 100644 --- a/lib/rbcodec/codecs/libtremor/oggmalloc.c +++ b/lib/rbcodec/codecs/libtremor/oggmalloc.c | |||
@@ -1,7 +1,7 @@ | |||
1 | #include "os_types.h" | 1 | #include "os_types.h" |
2 | #include <tlsf.h> | 2 | #include <tlsf.h> |
3 | 3 | ||
4 | #if defined(CPU_ARM) || defined(CPU_COLDFIRE) || defined(CPU_MIPS) | 4 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
5 | #include <setjmp.h> | 5 | #include <setjmp.h> |
6 | extern jmp_buf rb_jump_buf; | 6 | extern jmp_buf rb_jump_buf; |
7 | #define LONGJMP(x) longjmp(rb_jump_buf, x) | 7 | #define LONGJMP(x) longjmp(rb_jump_buf, x) |
@@ -31,7 +31,7 @@ void *ogg_malloc(size_t size) | |||
31 | 31 | ||
32 | if (x == NULL) | 32 | if (x == NULL) |
33 | LONGJMP(1); | 33 | LONGJMP(1); |
34 | 34 | ||
35 | return x; | 35 | return x; |
36 | } | 36 | } |
37 | 37 | ||
@@ -41,7 +41,7 @@ void *ogg_calloc(size_t nmemb, size_t size) | |||
41 | 41 | ||
42 | if (x == NULL) | 42 | if (x == NULL) |
43 | LONGJMP(1); | 43 | LONGJMP(1); |
44 | 44 | ||
45 | return x; | 45 | return x; |
46 | } | 46 | } |
47 | 47 | ||
@@ -51,7 +51,7 @@ void *ogg_realloc(void *ptr, size_t size) | |||
51 | 51 | ||
52 | if (x == NULL) | 52 | if (x == NULL) |
53 | LONGJMP(1); | 53 | LONGJMP(1); |
54 | 54 | ||
55 | return x; | 55 | return x; |
56 | } | 56 | } |
57 | 57 | ||
diff --git a/lib/rbcodec/codecs/vorbis.c b/lib/rbcodec/codecs/vorbis.c index 83c9d5b31d..ce1f4ba893 100644 --- a/lib/rbcodec/codecs/vorbis.c +++ b/lib/rbcodec/codecs/vorbis.c | |||
@@ -28,7 +28,7 @@ | |||
28 | 28 | ||
29 | CODEC_HEADER | 29 | CODEC_HEADER |
30 | 30 | ||
31 | #if defined(CPU_ARM) || defined(CPU_COLDFIRE) || defined(CPU_MIPS) | 31 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
32 | #include <setjmp.h> | 32 | #include <setjmp.h> |
33 | jmp_buf rb_jump_buf; | 33 | jmp_buf rb_jump_buf; |
34 | #endif | 34 | #endif |
@@ -135,7 +135,7 @@ enum codec_status codec_run(void) | |||
135 | ogg_int64_t vf_pcmlengths[2]; | 135 | ogg_int64_t vf_pcmlengths[2]; |
136 | intptr_t param; | 136 | intptr_t param; |
137 | 137 | ||
138 | #if defined(CPU_ARM) || defined(CPU_COLDFIRE) || defined(CPU_MIPS) | 138 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
139 | if (setjmp(rb_jump_buf) != 0) { | 139 | if (setjmp(rb_jump_buf) != 0) { |
140 | /* malloc failed; finish with this track */ | 140 | /* malloc failed; finish with this track */ |
141 | goto done; | 141 | goto done; |
@@ -153,7 +153,7 @@ enum codec_status codec_run(void) | |||
153 | 153 | ||
154 | /* Open a non-seekable stream */ | 154 | /* Open a non-seekable stream */ |
155 | error = ov_open_callbacks(ci, &vf, NULL, 0, callbacks); | 155 | error = ov_open_callbacks(ci, &vf, NULL, 0, callbacks); |
156 | 156 | ||
157 | /* If the non-seekable open was successful, we need to supply the missing | 157 | /* If the non-seekable open was successful, we need to supply the missing |
158 | * data to make it seekable. This is a hack, but it's reasonable since we | 158 | * data to make it seekable. This is a hack, but it's reasonable since we |
159 | * don't want to run the whole file through the buffer before we start | 159 | * don't want to run the whole file through the buffer before we start |