diff options
author | Dan Albert <danalbert@google.com> | 2018-02-06 17:16:53 -0800 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2018-02-07 13:21:44 -0800 |
commit | b737531c1b96ad2655b4e7fb3067e4913ca9c7ab (patch) | |
tree | 887a2e26ca1276c3d1a720822e4ed65260460106 /sources | |
parent | d0dd54a20855dcb9cfdcda2c129edf1e4d2f42bb (diff) | |
download | ndk-b737531c1b96ad2655b4e7fb3067e4913ca9c7ab.tar.gz |
Remove posix_memalign from libandroid_support.
This function is now available in all supported API levels.
Test: ./checkbuild.py && ./run_tests.py
Bug: None
Change-Id: I209789d36e1e06a4edc4beb7050a8063f359a5ca
Diffstat (limited to 'sources')
-rw-r--r-- | sources/android/support/Android.mk | 1 | ||||
-rw-r--r-- | sources/android/support/include/stdlib.h | 4 | ||||
-rw-r--r-- | sources/android/support/src/posix_memalign.cpp | 20 |
3 files changed, 0 insertions, 25 deletions
diff --git a/sources/android/support/Android.mk b/sources/android/support/Android.mk index d0e0060db..89ba793bb 100644 --- a/sources/android/support/Android.mk +++ b/sources/android/support/Android.mk @@ -104,7 +104,6 @@ android_support_sources := \ $(BIONIC_PATH)/libm/upstream-freebsd/lib/msun/src/s_tan.c \ $(BIONIC_PATH)/libm/upstream-freebsd/lib/msun/src/s_tanh.c \ src/locale_support.cpp \ - src/posix_memalign.cpp \ src/swprintf.cpp \ src/wcstox.cpp \ diff --git a/sources/android/support/include/stdlib.h b/sources/android/support/include/stdlib.h index b0cc57974..a6895d6a8 100644 --- a/sources/android/support/include/stdlib.h +++ b/sources/android/support/include/stdlib.h @@ -33,10 +33,6 @@ __BEGIN_DECLS -#if __ANDROID_API__ < __ANDROID_API_J__ -int posix_memalign(void** memptr, size_t alignment, size_t size); -#endif - #if __ANDROID_API__ < __ANDROID_API_L__ #undef MB_CUR_MAX size_t __ctype_get_mb_cur_max(void); diff --git a/sources/android/support/src/posix_memalign.cpp b/sources/android/support/src/posix_memalign.cpp deleted file mode 100644 index cf7abbbf5..000000000 --- a/sources/android/support/src/posix_memalign.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include <errno.h> -#include <malloc.h> -#include <stdlib.h> - -int posix_memalign(void** memptr, size_t alignment, size_t size) { - if ((alignment & (alignment - 1)) != 0 || alignment == 0) { - return EINVAL; - } - - if (alignment % sizeof(void*) != 0) { - return EINVAL; - } - - *memptr = memalign(alignment, size); - if (*memptr == NULL) { - return errno; - } - - return 0; -} |