summaryrefslogtreecommitdiffstats
path: root/lib/rbcodec/codecs
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2021-03-04 08:59:17 -0500
committerSolomon Peachy <pizza@shaftnet.org>2021-03-04 14:14:33 +0000
commit2628155fc9947dcf463938553f057c39ccc2227a (patch)
tree2f852f1668c5ed94d86ea53ad89c646884490044 /lib/rbcodec/codecs
parent15b4d229139d2f596ba18ca3331f0ce9c7134cb4 (diff)
downloadrockbox-2628155fc9947dcf463938553f057c39ccc2227a.tar.gz
rockbox-2628155fc9947dcf463938553f057c39ccc2227a.tar.bz2
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
Diffstat (limited to 'lib/rbcodec/codecs')
-rw-r--r--lib/rbcodec/codecs/libtremor/oggmalloc.c8
-rw-r--r--lib/rbcodec/codecs/vorbis.c6
2 files changed, 7 insertions, 7 deletions
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 @@
#include "os_types.h"
#include <tlsf.h>
-#if defined(CPU_ARM) || defined(CPU_COLDFIRE) || defined(CPU_MIPS)
+#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
#include <setjmp.h>
extern jmp_buf rb_jump_buf;
#define LONGJMP(x) longjmp(rb_jump_buf, x)
@@ -31,7 +31,7 @@ void *ogg_malloc(size_t size)
if (x == NULL)
LONGJMP(1);
-
+
return x;
}
@@ -41,7 +41,7 @@ void *ogg_calloc(size_t nmemb, size_t size)
if (x == NULL)
LONGJMP(1);
-
+
return x;
}
@@ -51,7 +51,7 @@ void *ogg_realloc(void *ptr, size_t size)
if (x == NULL)
LONGJMP(1);
-
+
return x;
}
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 @@
CODEC_HEADER
-#if defined(CPU_ARM) || defined(CPU_COLDFIRE) || defined(CPU_MIPS)
+#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
#include <setjmp.h>
jmp_buf rb_jump_buf;
#endif
@@ -135,7 +135,7 @@ enum codec_status codec_run(void)
ogg_int64_t vf_pcmlengths[2];
intptr_t param;
-#if defined(CPU_ARM) || defined(CPU_COLDFIRE) || defined(CPU_MIPS)
+#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
if (setjmp(rb_jump_buf) != 0) {
/* malloc failed; finish with this track */
goto done;
@@ -153,7 +153,7 @@ enum codec_status codec_run(void)
/* Open a non-seekable stream */
error = ov_open_callbacks(ci, &vf, NULL, 0, callbacks);
-
+
/* If the non-seekable open was successful, we need to supply the missing
* data to make it seekable. This is a hack, but it's reasonable since we
* don't want to run the whole file through the buffer before we start