Fix incorrect API level for wcstombs and mbstowcs.
Mbstowcs and wcstombs cannot get correct return value when called in the environment below api 21, and need to raise the API level to solve the problem.
Test: None
fix bug 1108 https://github.com/android/ndk/issues/1108
Change-Id: Iabcf1bff0be087288646687732ef68870630b48a
diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h
index 583287f..252e73a 100644
--- a/libc/include/stdlib.h
+++ b/libc/include/stdlib.h
@@ -161,11 +161,11 @@
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);
+size_t mbstowcs(wchar_t* __dst, const char* __src, size_t __n) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
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);
+size_t wcstombs(char* __dst, const wchar_t* __src, size_t __n) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
#if __ANDROID_API__ >= 21
size_t __ctype_get_mb_cur_max(void) __INTRODUCED_IN(21);
diff --git a/libc/libc.map.txt b/libc/libc.map.txt
index 00b25d3..7397b68 100644
--- a/libc/libc.map.txt
+++ b/libc/libc.map.txt
@@ -631,7 +631,7 @@
mbsinit;
mbsnrtowcs; # introduced=21
mbsrtowcs;
- mbstowcs;
+ mbstowcs; # introduced=21
mbtowc; # introduced=21
memalign;
memccpy;
@@ -1194,7 +1194,7 @@
wcstold_l; # introduced=21
wcstoll; # introduced=21
wcstoll_l; # introduced=21
- wcstombs;
+ wcstombs; # introduced=21
wcstoul;
wcstoull; # introduced=21
wcstoull_l; # introduced=21