diff options
author | Dan Albert <danalbert@google.com> | 2014-06-14 01:04:31 +0000 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2014-06-14 01:04:31 +0000 |
commit | e5fdaa4f9d102461a4d8a865e6ca84666893b9e7 (patch) | |
tree | c17c2b67e2f12161e67f9b337c9cdc11bd8eab5f /libc/bionic/malloc_debug_common.h | |
parent | a04d2bc28e7d7fcaf34ad71e4a6608a13cf84197 (diff) | |
download | android_bionic-e5fdaa4f9d102461a4d8a865e6ca84666893b9e7.tar.gz android_bionic-e5fdaa4f9d102461a4d8a865e6ca84666893b9e7.tar.bz2 android_bionic-e5fdaa4f9d102461a4d8a865e6ca84666893b9e7.zip |
Revert "Backing this one out since the counterpart needs to be sent upstream."
This reverts commit a04d2bc28e7d7fcaf34ad71e4a6608a13cf84197.
Change-Id: I1b49165ca5d4bafdba7948818256a6167a363aca
Diffstat (limited to 'libc/bionic/malloc_debug_common.h')
-rw-r--r-- | libc/bionic/malloc_debug_common.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libc/bionic/malloc_debug_common.h b/libc/bionic/malloc_debug_common.h index 8052a1775..a0f9972dd 100644 --- a/libc/bionic/malloc_debug_common.h +++ b/libc/bionic/malloc_debug_common.h @@ -61,6 +61,12 @@ #define Malloc(function) dl ## function #endif +// valloc(3) and pvalloc(3) were removed from POSIX 2004. We do not include them +// for LP64, but the symbols remain in LP32 for binary compatibility. +#ifndef __LP64__ +#define HAVE_DEPRECATED_MALLOC_FUNCS 1 +#endif + // ============================================================================= // Structures // ============================================================================= @@ -90,9 +96,14 @@ typedef void* (*MallocDebugMalloc)(size_t); typedef size_t (*MallocDebugMallocUsableSize)(const void*); typedef void* (*MallocDebugMemalign)(size_t, size_t); typedef int (*MallocDebugPosixMemalign)(void**, size_t, size_t); +#if defined(HAVE_DEPRECATED_MALLOC_FUNCS) typedef void* (*MallocDebugPvalloc)(size_t); +#endif typedef void* (*MallocDebugRealloc)(void*, size_t); +#if defined(HAVE_DEPRECATED_MALLOC_FUNCS) typedef void* (*MallocDebugValloc)(size_t); +#endif + struct MallocDebug { MallocDebugCalloc calloc; MallocDebugFree free; @@ -101,9 +112,13 @@ struct MallocDebug { MallocDebugMallocUsableSize malloc_usable_size; MallocDebugMemalign memalign; MallocDebugPosixMemalign posix_memalign; +#if defined(HAVE_DEPRECATED_MALLOC_FUNCS) MallocDebugPvalloc pvalloc; +#endif MallocDebugRealloc realloc; +#if defined(HAVE_DEPRECATED_MALLOC_FUNCS) MallocDebugValloc valloc; +#endif }; typedef bool (*MallocDebugInit)(HashTable*); |