Skip to content

Commit

Permalink
Remove availability definitions for mbs APIs.
Browse files Browse the repository at this point in the history
Definitions for these are provided in libandroid_support for API
levels that do not expose this in the stubs. For the rare cases where
libandroid_support is not being used this will result in a lower
quality diagnostic (undefined reference instead of "not available
until API 21"), but other fixes would also have that behavior because
the libandroid_support headers are *always* available, even if
libandroid_support won't be linked.

Test: Reverted xfailed tests for #1108 and reran tests with this
Bug: android/ndk#1108
Change-Id: I371f5b9d7caeef8dc7c80f2f6d11280ecba119c9
  • Loading branch information
DanAlbert authored and travarilo committed Jul 8, 2022
1 parent bcf7f85 commit ddcafc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libc/include/stdlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ const char* getprogname(void) __INTRODUCED_IN(21);
void setprogname(const char* __name) __INTRODUCED_IN(21);

int mblen(const char* __s, size_t __n) __INTRODUCED_IN_NO_GUARD_FOR_NDK(26);
size_t mbstowcs(wchar_t* __dst, const char* __src, size_t __n) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
size_t mbstowcs(wchar_t* __dst, const char* __src, size_t __n) __INTRODUCED_IN_NO_GUARD_FOR_NDK(21);
int mbtowc(wchar_t* __wc_ptr, const char* __s, size_t __n) __INTRODUCED_IN_NO_GUARD_FOR_NDK(21);
int wctomb(char* __dst, wchar_t __wc) __INTRODUCED_IN_NO_GUARD_FOR_NDK(21);

size_t wcstombs(char* __dst, const wchar_t* __src, size_t __n) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
size_t wcstombs(char* __dst, const wchar_t* __src, size_t __n) __INTRODUCED_IN_NO_GUARD_FOR_NDK(21);

#if __ANDROID_API__ >= 21
size_t __ctype_get_mb_cur_max(void) __INTRODUCED_IN(21);
Expand Down

0 comments on commit ddcafc3

Please sign in to comment.