Merge "Add a few more legacy inlines for strto*_l."
am: 13dec2354d
Change-Id: I53574a944999870ccd3c2931ed17a588a70f8041
diff --git a/libc/include/android/legacy_stdlib_inlines.h b/libc/include/android/legacy_stdlib_inlines.h
index 4896d2e..439b486 100644
--- a/libc/include/android/legacy_stdlib_inlines.h
+++ b/libc/include/android/legacy_stdlib_inlines.h
@@ -45,7 +45,7 @@
__END_DECLS
-#endif
+#endif /* __ANDROID_API__ < __ANDROID_API_K__ */
#if __ANDROID_API__ < __ANDROID_API_L__
@@ -83,5 +83,29 @@
__END_DECLS
-#endif
+#endif /* __ANDROID_API__ < __ANDROID_API_L__ */
+
+#if __ANDROID_API__ < __ANDROID_API_O__
+
+#include <stdlib.h>
+#include <xlocale.h>
+
+__BEGIN_DECLS
+
+static __inline double strtod_l(const char* __s, char** __end_ptr, locale_t __l) {
+ return strtod(__s, __end_ptr);
+}
+
+static __inline float strtof_l(const char* __s, char** __end_ptr, locale_t __l) {
+ return strtof(__s, __end_ptr);
+}
+
+static __inline long strtol_l(const char* __s, char** __end_ptr, int __base, locale_t __l) {
+ return strtol(__s, __end_ptr, __base);
+}
+
+__END_DECLS
+
+#endif /* __ANDROID_API__ < __ANDROID_API_O__ */
+
#endif /* _ANDROID_LEGACY_STDLIB_INLINES_H_ */