aboutsummaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2017-09-18 14:07:50 -0700
committerDan Albert <danalbert@google.com>2017-09-25 12:56:29 -0700
commit9c0ca1218bc344f7ba1c13db1db7c851baf2b77e (patch)
treecf119275d821858efe7d9c80b3b7b9481624b2c8 /sources
parenta1961bc2726da40708e1c87e6d694a82a4eff61e (diff)
downloadndk-9c0ca1218bc344f7ba1c13db1db7c851baf2b77e.tar.gz
Adapt to bionic using __RENAME for some functions.
Bug: https://issuetracker.google.com/64450768 Bug: https://github.com/android-ndk/ndk/issues/507 Test: built tests Change-Id: I49b8a6008e5131b054eb1eefe0a0130699e3b082
Diffstat (limited to 'sources')
-rw-r--r--sources/android/support/Android.mk10
-rw-r--r--sources/android/support/include/stdlib.h2
-rw-r--r--sources/android/support/include/wchar.h1
-rw-r--r--sources/android/support/src/_Exit.cpp34
-rw-r--r--sources/android/support/src/stdlib_support.cpp34
-rw-r--r--sources/android/support/src/wcstox.cpp8
6 files changed, 0 insertions, 89 deletions
diff --git a/sources/android/support/Android.mk b/sources/android/support/Android.mk
index 560b086cf..d5479bf26 100644
--- a/sources/android/support/Android.mk
+++ b/sources/android/support/Android.mk
@@ -78,7 +78,6 @@ android_support_sources := \
$(BIONIC_PATH)/libc/upstream-openbsd/lib/libc/stdlib/imaxabs.c \
$(BIONIC_PATH)/libc/upstream-openbsd/lib/libc/stdlib/imaxdiv.c \
$(BIONIC_PATH)/libm/digittoint.c \
- $(BIONIC_PATH)/libm/fake_long_double.c \
$(BIONIC_PATH)/libm/upstream-freebsd/lib/msun/src/e_acos.c \
$(BIONIC_PATH)/libm/upstream-freebsd/lib/msun/src/e_acosh.c \
$(BIONIC_PATH)/libm/upstream-freebsd/lib/msun/src/e_asin.c \
@@ -118,20 +117,11 @@ android_support_sources := \
$(BIONIC_PATH)/libm/upstream-freebsd/lib/msun/src/s_sin.c \
$(BIONIC_PATH)/libm/upstream-freebsd/lib/msun/src/s_tan.c \
$(BIONIC_PATH)/libm/upstream-freebsd/lib/msun/src/s_tanh.c \
- src/_Exit.cpp \
src/iswblank.cpp \
src/posix_memalign.cpp \
- src/stdlib_support.cpp \
src/swprintf.cpp \
src/wcstox.cpp \
-ifneq (armeabi,$(TARGET_ARCH_ABI))
-# The file uses instructions that aren't available in arm5.
-android_support_sources += \
- $(BIONIC_PATH)/libm/upstream-freebsd/lib/msun/src/s_nearbyint.c \
-
-endif
-
ifeq (x86,$(TARGET_ARCH_ABI))
# Replaces broken implementations in x86 libm.so
android_support_sources += \
diff --git a/sources/android/support/include/stdlib.h b/sources/android/support/include/stdlib.h
index 5fd0460af..1049aedba 100644
--- a/sources/android/support/include/stdlib.h
+++ b/sources/android/support/include/stdlib.h
@@ -41,8 +41,6 @@ int posix_memalign(void** memptr, size_t alignment, size_t size);
#undef MB_CUR_MAX
size_t __ctype_get_mb_cur_max(void);
#define MB_CUR_MAX __ctype_get_mb_cur_max()
-void _Exit(int); // TODO: not needed after bionic commit 79dd9889d1701dda881bb383b212932fcf2ff25f.
-long double strtold(const char*, char**);
long double strtold_l(const char*, char**, locale_t);
long long strtoll_l(const char*, char**, int, locale_t);
unsigned long long strtoull_l(const char*, char**, int, locale_t);
diff --git a/sources/android/support/include/wchar.h b/sources/android/support/include/wchar.h
index 3056d4c06..9152cfee9 100644
--- a/sources/android/support/include/wchar.h
+++ b/sources/android/support/include/wchar.h
@@ -41,7 +41,6 @@ size_t mbsnrtowcs(wchar_t*, const char**, size_t, size_t, mbstate_t*);
size_t wcsnrtombs(char*, const wchar_t**, size_t, size_t, mbstate_t*);
float wcstof(const wchar_t*, wchar_t**);
long long wcstoll(const wchar_t*, wchar_t**, int);
-long double wcstold(const wchar_t*, wchar_t**);
unsigned long long wcstoull(const wchar_t*, wchar_t**, int);
#endif
diff --git a/sources/android/support/src/_Exit.cpp b/sources/android/support/src/_Exit.cpp
deleted file mode 100644
index c8ed61bd6..000000000
--- a/sources/android/support/src/_Exit.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <stdlib.h>
-#include <unistd.h>
-
-void _Exit(int status) {
- _exit(status);
-}
diff --git a/sources/android/support/src/stdlib_support.cpp b/sources/android/support/src/stdlib_support.cpp
deleted file mode 100644
index d2a760987..000000000
--- a/sources/android/support/src/stdlib_support.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <stdlib.h>
-
-long double strtold(const char* nptr, char** endptr) {
- static_assert(sizeof(double) == sizeof(long double), "double != long double");
- return strtod(nptr, endptr);
-}
diff --git a/sources/android/support/src/wcstox.cpp b/sources/android/support/src/wcstox.cpp
index 25da212df..c799b3f57 100644
--- a/sources/android/support/src/wcstox.cpp
+++ b/sources/android/support/src/wcstox.cpp
@@ -102,14 +102,6 @@ double wcstod(const wchar_t *restrict s, wchar_t **restrict p) {
return wcstox(strtod_wrapper, s, p, 0);
}
-static long double strtold_wrapper(const char* s, char** p, int) {
- return strtold(s, p);
-}
-
-long double wcstold(const wchar_t *restrict s, wchar_t **restrict p) {
- return wcstox(strtold_wrapper, s, p, 0);
-}
-
long wcstol(const wchar_t *restrict s, wchar_t **restrict p, int base) {
return wcstox(strtol, s, p, base);
}