Fix __VERSIONER_NO_GUARD cases for availability.
libc++ still depends on these being declared even if they are
unavailable. This results in a worse error message (a link error
rather than a compiler diagnostic) if these functions end up being
used, but without the decl headers like libc++'s math.h can't be
included because it refers to an undeclared function.
For the cases where weak symbols aren't being used, don't annotate
these functions with their availability information.
Also need to avoid using __builtin_available for this case because the
NDK doesn't have __isOSVersionAtLeast yet.
__ANDROID_UNGUARDED_AVAILABILITY__ is being used as a proxy for
"building for the NDK" here because we don't have a good signal for
that which works for both the NDK proper and the NDK-in-the-platform
case.
Test: imported into the NDK, built and tested NDK
Bug: None
Change-Id: I9ef3e19a8fa083bca0be47b80dfef7ba52a94866
diff --git a/libc/include/locale.h b/libc/include/locale.h
index 4290992..8785b24 100644
--- a/libc/include/locale.h
+++ b/libc/include/locale.h
@@ -96,7 +96,7 @@
char int_n_sign_posn;
};
-struct lconv* localeconv(void) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
+struct lconv* localeconv(void) __INTRODUCED_IN_NO_GUARD_FOR_NDK(21);
locale_t duplocale(locale_t __l) __INTRODUCED_IN(21);
void freelocale(locale_t __l) __INTRODUCED_IN(21);