Merge "Add a few more legacy inlines for strto*_l."

This commit is contained in:
Treehugger Robot 2018-02-07 19:55:43 +00:00 committed by Gerrit Code Review
commit 13dec2354d

View file

@ -45,7 +45,7 @@ static __inline long long llabs(long long __n) {
__END_DECLS
#endif
#endif /* __ANDROID_API__ < __ANDROID_API_K__ */
#if __ANDROID_API__ < __ANDROID_API_L__
@ -83,5 +83,29 @@ static __inline int grantpt(int __fd __attribute((unused))) {
__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_ */