summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-02-28 20:55:31 +0000
committerJens Arnold <amiconn@rockbox.org>2005-02-28 20:55:31 +0000
commitb363d656252eed5720e9f172dafa7b56ac66a994 (patch)
tree0e42dd388ea71cd83ee40b5007bb813cd1946dad /apps/plugins
parentc080f7e19e96a88e9711417ac039f082b11f2655 (diff)
downloadrockbox-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.c16
-rw-r--r--apps/plugins/lib/xxx2wav.h9
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
33unsigned char* mallocbuf; // 512K from the start of MP3 buffer 33unsigned char* mallocbuf; // 512K from the start of MP3 buffer
34unsigned char* filebuf; // The rest of the MP3 buffer 34unsigned char* filebuf; // The rest of the MP3 buffer
35 35
36void* malloc(size_t size) { 36void* 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
49void* calloc(size_t nmemb, size_t size) { 49void* 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
56void* alloca(size_t size) { 56void* 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
62void free(void* ptr) { 62void codec_free(void* ptr) {
63 (void)ptr; 63 (void)ptr;
64} 64}
65 65
66void* realloc(void* ptr, size_t size) { 66void* 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
42extern unsigned char* mallocbuf; // 512K from the start of MP3 buffer 42extern unsigned char* mallocbuf; // 512K from the start of MP3 buffer
43extern unsigned char* filebuf; // The rest of the MP3 buffer 43extern unsigned char* filebuf; // The rest of the MP3 buffer
44 44
45void* malloc(size_t size); 45void* codec_malloc(size_t size);
46void* calloc(size_t nmemb, size_t size); 46void* codec_calloc(size_t nmemb, size_t size);
47void free(void* ptr); 47void* codec_alloca(size_t size);
48void* realloc(void* ptr, size_t size); 48void* codec_realloc(void* ptr, size_t size);
49void codec_free(void* ptr);
49void *memcpy(void *dest, const void *src, size_t n); 50void *memcpy(void *dest, const void *src, size_t n);
50void *memset(void *s, int c, size_t n); 51void *memset(void *s, int c, size_t n);
51int memcmp(const void *s1, const void *s2, size_t n); 52int memcmp(const void *s1, const void *s2, size_t n);