Add strtof_l and strtod_l.
libc++ needs these now. Add shims to match the others.
Test: make checkbuild tests
Bug: http://b/31639993
Change-Id: Ifec6c32099145d8d3d1a5639a4809e5e9f553c33
diff --git a/libc/bionic/locale.cpp b/libc/bionic/locale.cpp
index 2a4ce68..e51b38c 100644
--- a/libc/bionic/locale.cpp
+++ b/libc/bionic/locale.cpp
@@ -196,6 +196,18 @@
return strncasecmp(s1, s2, n);
}
+double strtod_l(const char* s, char** end_ptr, locale_t) {
+ return strtod(s, end_ptr);
+}
+
+float strtof_l(const char* s, char** end_ptr, locale_t) {
+ return strtof(s, end_ptr);
+}
+
+long strtol_l(const char* s, char** end_ptr, int base, locale_t) {
+ return strtol(s, end_ptr, base);
+}
+
long double strtold_l(const char* s, char** end_ptr, locale_t) {
return strtold(s, end_ptr);
}
@@ -204,6 +216,10 @@
return strtoll(s, end_ptr, base);
}
+unsigned long strtoul_l(const char* s, char** end_ptr, int base, locale_t) {
+ return strtoul(s, end_ptr, base);
+}
+
unsigned long long strtoull_l(const char* s, char** end_ptr, int base, locale_t) {
return strtoull(s, end_ptr, base);
}