diff options
Diffstat (limited to 'memory/build/mozmemory_wrap.c')
-rw-r--r-- | memory/build/mozmemory_wrap.c | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/memory/build/mozmemory_wrap.c b/memory/build/mozmemory_wrap.c index dba3ace56..fdb8447d3 100644 --- a/memory/build/mozmemory_wrap.c +++ b/memory/build/mozmemory_wrap.c @@ -88,60 +88,6 @@ strdup_impl(const char *src) } #endif /* XP_DARWIN */ -#ifdef ANDROID -#include <stdarg.h> -#include <stdio.h> - -MOZ_MEMORY_API int -vasprintf_impl(char **str, const char *fmt, va_list ap) -{ - char* ptr, *_ptr; - int ret; - - if (str == NULL || fmt == NULL) { - return -1; - } - - ptr = (char*)malloc_impl(128); - if (ptr == NULL) { - *str = NULL; - return -1; - } - - ret = vsnprintf(ptr, 128, fmt, ap); - if (ret < 0) { - free_impl(ptr); - *str = NULL; - return -1; - } - - _ptr = realloc_impl(ptr, ret + 1); - if (_ptr == NULL) { - free_impl(ptr); - *str = NULL; - return -1; - } - - *str = _ptr; - - return ret; -} - -MOZ_MEMORY_API int -asprintf_impl(char **str, const char *fmt, ...) -{ - int ret; - va_list ap; - va_start(ap, fmt); - - ret = vasprintf_impl(str, fmt, ap); - - va_end(ap); - - return ret; -} -#endif - #ifdef XP_WIN /* * There's a fun allocator mismatch in (at least) the VS 2010 CRT |