diff options
author | Jens Arnold <amiconn@rockbox.org> | 2005-02-28 20:55:31 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2005-02-28 20:55:31 +0000 |
commit | b363d656252eed5720e9f172dafa7b56ac66a994 (patch) | |
tree | 0e42dd388ea71cd83ee40b5007bb813cd1946dad /apps/plugins | |
parent | c080f7e19e96a88e9711417ac039f082b11f2655 (diff) | |
download | rockbox-b363d656252eed5720e9f172dafa7b56ac66a994.tar.gz rockbox-b363d656252eed5720e9f172dafa7b56ac66a994.zip |
Get malloc() and friends out of the way for the cygwin linker (and maybe others), to make plugins work properly in the simulator.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6086 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/lib/xxx2wav.c | 16 | ||||
-rw-r--r-- | apps/plugins/lib/xxx2wav.h | 9 |
2 files changed, 13 insertions, 12 deletions
diff --git a/apps/plugins/lib/xxx2wav.c b/apps/plugins/lib/xxx2wav.c index 3f8853ffbf..3f9fab062b 100644 --- a/apps/plugins/lib/xxx2wav.c +++ b/apps/plugins/lib/xxx2wav.c | |||
@@ -33,7 +33,7 @@ unsigned char* mp3buf; // The actual MP3 buffer from Rockbox | |||
33 | unsigned char* mallocbuf; // 512K from the start of MP3 buffer | 33 | unsigned char* mallocbuf; // 512K from the start of MP3 buffer |
34 | unsigned char* filebuf; // The rest of the MP3 buffer | 34 | unsigned char* filebuf; // The rest of the MP3 buffer |
35 | 35 | ||
36 | void* malloc(size_t size) { | 36 | void* codec_malloc(size_t size) { |
37 | void* x; | 37 | void* x; |
38 | char s[32]; | 38 | char s[32]; |
39 | 39 | ||
@@ -46,27 +46,27 @@ void* malloc(size_t size) { | |||
46 | return(x); | 46 | return(x); |
47 | } | 47 | } |
48 | 48 | ||
49 | void* calloc(size_t nmemb, size_t size) { | 49 | void* codec_calloc(size_t nmemb, size_t size) { |
50 | void* x; | 50 | void* x; |
51 | x=malloc(nmemb*size); | 51 | x = codec_malloc(nmemb*size); |
52 | local_rb->memset(x,0,nmemb*size); | 52 | local_rb->memset(x,0,nmemb*size); |
53 | return(x); | 53 | return(x); |
54 | } | 54 | } |
55 | 55 | ||
56 | void* alloca(size_t size) { | 56 | void* codec_alloca(size_t size) { |
57 | void* x; | 57 | void* x; |
58 | x=malloc(size); | 58 | x = codec_malloc(size); |
59 | return(x); | 59 | return(x); |
60 | } | 60 | } |
61 | 61 | ||
62 | void free(void* ptr) { | 62 | void codec_free(void* ptr) { |
63 | (void)ptr; | 63 | (void)ptr; |
64 | } | 64 | } |
65 | 65 | ||
66 | void* realloc(void* ptr, size_t size) { | 66 | void* codec_realloc(void* ptr, size_t size) { |
67 | void* x; | 67 | void* x; |
68 | (void)ptr; | 68 | (void)ptr; |
69 | x=malloc(size); | 69 | x = codec_malloc(size); |
70 | return(x); | 70 | return(x); |
71 | } | 71 | } |
72 | 72 | ||
diff --git a/apps/plugins/lib/xxx2wav.h b/apps/plugins/lib/xxx2wav.h index e89361c46a..2806eabf27 100644 --- a/apps/plugins/lib/xxx2wav.h +++ b/apps/plugins/lib/xxx2wav.h | |||
@@ -42,10 +42,11 @@ extern unsigned char* mp3buf; // The actual MP3 buffer from Rockbox | |||
42 | extern unsigned char* mallocbuf; // 512K from the start of MP3 buffer | 42 | extern unsigned char* mallocbuf; // 512K from the start of MP3 buffer |
43 | extern unsigned char* filebuf; // The rest of the MP3 buffer | 43 | extern unsigned char* filebuf; // The rest of the MP3 buffer |
44 | 44 | ||
45 | void* malloc(size_t size); | 45 | void* codec_malloc(size_t size); |
46 | void* calloc(size_t nmemb, size_t size); | 46 | void* codec_calloc(size_t nmemb, size_t size); |
47 | void free(void* ptr); | 47 | void* codec_alloca(size_t size); |
48 | void* realloc(void* ptr, size_t size); | 48 | void* codec_realloc(void* ptr, size_t size); |
49 | void codec_free(void* ptr); | ||
49 | void *memcpy(void *dest, const void *src, size_t n); | 50 | void *memcpy(void *dest, const void *src, size_t n); |
50 | void *memset(void *s, int c, size_t n); | 51 | void *memset(void *s, int c, size_t n); |
51 | int memcmp(const void *s1, const void *s2, size_t n); | 52 | int memcmp(const void *s1, const void *s2, size_t n); |