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.zip rockbox-b363d656252eed5720e9f172dafa7b56ac66a994.tar.gz rockbox-b363d656252eed5720e9f172dafa7b56ac66a994.tar.bz2 rockbox-b363d656252eed5720e9f172dafa7b56ac66a994.tar.xz | |
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 3f8853f..3f9fab0 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 unsigned char* mallocbuf; // 512K from the start of MP3 buffer unsigned char* filebuf; // The rest of the MP3 buffer -void* malloc(size_t size) { +void* codec_malloc(size_t size) { void* x; char s[32]; @@ -46,27 +46,27 @@ void* malloc(size_t size) { return(x); } -void* calloc(size_t nmemb, size_t size) { +void* codec_calloc(size_t nmemb, size_t size) { void* x; - x=malloc(nmemb*size); + x = codec_malloc(nmemb*size); local_rb->memset(x,0,nmemb*size); return(x); } -void* alloca(size_t size) { +void* codec_alloca(size_t size) { void* x; - x=malloc(size); + x = codec_malloc(size); return(x); } -void free(void* ptr) { +void codec_free(void* ptr) { (void)ptr; } -void* realloc(void* ptr, size_t size) { +void* codec_realloc(void* ptr, size_t size) { void* x; (void)ptr; - x=malloc(size); + x = codec_malloc(size); return(x); } diff --git a/apps/plugins/lib/xxx2wav.h b/apps/plugins/lib/xxx2wav.h index e89361c..2806eab 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 extern unsigned char* mallocbuf; // 512K from the start of MP3 buffer extern unsigned char* filebuf; // The rest of the MP3 buffer -void* malloc(size_t size); -void* calloc(size_t nmemb, size_t size); -void free(void* ptr); -void* realloc(void* ptr, size_t size); +void* codec_malloc(size_t size); +void* codec_calloc(size_t nmemb, size_t size); +void* codec_alloca(size_t size); +void* codec_realloc(void* ptr, size_t size); +void codec_free(void* ptr); void *memcpy(void *dest, const void *src, size_t n); void *memset(void *s, int c, size_t n); int memcmp(const void *s1, const void *s2, size_t n); |