[libcxx] Omit unneeded locale fallbacks on Android 21+
authorShoaib Meenai <smeenai@fb.com>
Fri, 8 Nov 2019 03:55:58 +0000 (19:55 -0800)
committerShoaib Meenai <smeenai@fb.com>
Mon, 25 Nov 2019 19:06:08 +0000 (11:06 -0800)
Android API level 21 and above have all these functions available, so we
don't need to include our fallback definitions.

Differential Revision: https://reviews.llvm.org/D69983

libcxx/include/support/android/locale_bionic.h

index 5b16071..f05a6a0 100644 (file)
@@ -27,7 +27,9 @@ extern "C" {
 
 #include <android/api-level.h>
 #include <android/ndk-version.h>
+#if __ANDROID_API__ < 21
 #include <support/xlocale/__posix_l_fallback.h>
+#endif
 // In NDK versions later than 16, locale-aware functions are provided by
 // legacy_stdlib_inlines.h
 #if __NDK_MAJOR__ <= 16