Add legacy inlines for locale aware APIs.

Test: make checkbuild tests
Bug: http://b/31639993
Change-Id: Ic43d690dff3c6960d7826bd0b064640a3ea0e883
diff --git a/libc/include/android/legacy_stdlib_inlines.h b/libc/include/android/legacy_stdlib_inlines.h
index 93554e5..77fdd5d 100644
--- a/libc/include/android/legacy_stdlib_inlines.h
+++ b/libc/include/android/legacy_stdlib_inlines.h
@@ -32,10 +32,10 @@
 #include <stdlib.h>
 #include <sys/cdefs.h>
 
-#if __ANDROID_API__ < 21
-
 __BEGIN_DECLS
 
+#if __ANDROID_API__ < 21
+
 static __inline float strtof(const char *nptr, char **endptr) {
   return (float)strtod(nptr, endptr);
 }
@@ -62,7 +62,32 @@
   return 0; /* devpts does this all for us! */
 }
 
-__END_DECLS
+static __inline long double strtold_l(const char* nptr, char** endptr, locale_t l __unused) {
+  return strtold(nptr, endptr);
+}
 
-#endif
+static __inline long long strtoll_l(const char* nptr, char** endptr, int base, locale_t l __unused) {
+  return strtoll(nptr, endptr, base);
+}
+
+static __inline unsigned long long strtoull_l(const char* nptr, char** endptr, int base,
+                                              locale_t l __unused) {
+  return strtoull(nptr, endptr, base);
+}
+
+#endif /* __ANDROID_API__ < 21 */
+
+#if __ANDROID_API__ < __ANDROID_API_FUTURE__
+
+static __inline float strtof_l(const char* nptr, char** endptr, locale_t l __unused) {
+  return strtof(nptr, endptr);
+}
+
+static __inline double strtod_l(const char* nptr, char** endptr, locale_t l __unused) {
+  return strtod(nptr, endptr);
+}
+
+#endif /* __ANDROID_API__ < __ANDROID_API_FUTURE__ */
+
+__END_DECLS
 #endif /* _ANDROID_LEGACY_STDLIB_INLINES_H_ */