1010#ifndef _LIBCPP___LOCALE_LOCALE_BASE_API_ANDROID_H
1111#define _LIBCPP___LOCALE_LOCALE_BASE_API_ANDROID_H
1212
13- #if defined(__BIONIC__)
13+ #include < stdlib.h >
1414
15- # ifdef __cplusplus
15+ // FIXME: Is this actually required?
1616extern " C" {
17- # endif
18-
19- # include < stdlib.h>
20- # include < xlocale.h>
21-
22- # ifdef __cplusplus
17+ #include < xlocale.h>
2318}
24- # endif
2519
26- # if defined(__ANDROID__)
27-
28- # include < android/api-level.h>
29- # if __ANDROID_API__ < 21
30- # include < __support/xlocale/__posix_l_fallback.h>
31- # endif
20+ #include < android/api-level.h>
21+ #if __ANDROID_API__ < 21
22+ # include < __support/xlocale/__posix_l_fallback.h>
23+ #endif
3224
3325// If we do not have this header, we are in a platform build rather than an NDK
3426// build, which will always be at least as new as the ToT NDK, in which case we
3527// don't need any of the inlines below since libc provides them.
36- # if __has_include(<android/ndk-version.h>)
37- # include < android/ndk-version.h>
28+ #if __has_include(<android/ndk-version.h>)
29+ # include < android/ndk-version.h>
3830// In NDK versions later than 16, locale-aware functions are provided by
3931// legacy_stdlib_inlines.h
40- # if __NDK_MAJOR__ <= 16
41- # if __ANDROID_API__ < 21
42- # include < __support/xlocale/__strtonum_fallback.h>
43- # elif __ANDROID_API__ < 26
32+ # if __NDK_MAJOR__ <= 16
33+ # if __ANDROID_API__ < 21
34+ # include < __support/xlocale/__strtonum_fallback.h>
35+ # elif __ANDROID_API__ < 26
4436
4537inline _LIBCPP_HIDE_FROM_ABI float strtof_l (const char * __nptr, char ** __endptr, locale_t ) {
4638 return ::strtof (__nptr, __endptr);
@@ -50,15 +42,9 @@ inline _LIBCPP_HIDE_FROM_ABI double strtod_l(const char* __nptr, char** __endptr
5042 return ::strtod (__nptr, __endptr);
5143}
5244
53- inline _LIBCPP_HIDE_FROM_ABI long strtol_l (const char * __nptr, char ** __endptr, int __base, locale_t ) {
54- return ::strtol (__nptr, __endptr, __base);
55- }
56-
57- # endif // __ANDROID_API__ < 26
45+ # endif // __ANDROID_API__ < 26
5846
59- # endif // __NDK_MAJOR__ <= 16
60- # endif // __has_include(<android/ndk-version.h>)
61- # endif // defined(__ANDROID__)
47+ # endif // __NDK_MAJOR__ <= 16
48+ #endif // __has_include(<android/ndk-version.h>)
6249
63- #endif // defined(__BIONIC__)
6450#endif // _LIBCPP___LOCALE_LOCALE_BASE_API_ANDROID_H
0 commit comments