Provide fake definitions for libstdc++.

libstdc++ needs to be able to `using ::foo` these in the various C++
wrapper headers for the C library. The NDK long ago added fake
definitions. We need to keep the same.

Test: make checkbuild
Bug: http://b/30465923
Change-Id: Id513b72a59eafcc823080631e07b21290d5e3b24
This commit is contained in:
Dan Albert 2016-09-06 16:51:00 -07:00
parent 69b26542de
commit cb0b14385b
4 changed files with 21 additions and 11 deletions

View File

@ -58,8 +58,8 @@ wctype_t wctype(const char*);
int iswctype(wint_t, wctype_t);
typedef const void* wctrans_t;
wint_t towctrans(wint_t, wctrans_t) __INTRODUCED_IN_FUTURE;
wctrans_t wctrans(const char*) __INTRODUCED_IN_FUTURE;
wint_t towctrans(wint_t, wctrans_t) __INTRODUCED_IN_FUTURE __VERSIONER_NO_GUARD;
wctrans_t wctrans(const char*) __INTRODUCED_IN_FUTURE __VERSIONER_NO_GUARD;
__END_DECLS

View File

@ -96,7 +96,7 @@ struct lconv {
char int_n_sign_posn;
};
struct lconv* localeconv(void) __INTRODUCED_IN(21);
struct lconv* localeconv(void) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
locale_t duplocale(locale_t) __INTRODUCED_IN(21);
void freelocale(locale_t) __INTRODUCED_IN(21);

View File

@ -259,11 +259,12 @@ long double expm1l(long double) __INTRODUCED_IN(21);
long double fabsl(long double) __pure2;
long double fdiml(long double, long double);
long double floorl(long double);
long double fmal(long double, long double, long double) __INTRODUCED_IN(21);
long double fmal(long double, long double, long double) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
long double fmaxl(long double, long double) __pure2;
long double fminl(long double, long double) __pure2;
long double fmodl(long double, long double) __INTRODUCED_IN(21);
long double frexpl(long double value, int*) __INTRODUCED_IN(21); /* fundamentally !__pure2 */
long double frexpl(long double value, int*)
__INTRODUCED_IN(21) __VERSIONER_NO_GUARD; /* fundamentally !__pure2 */
long double hypotl(long double, long double) __INTRODUCED_IN(21);
int ilogbl(long double) __pure2;
long double ldexpl(long double, int);
@ -280,10 +281,10 @@ long lroundl(long double);
long double modfl(long double, long double*) __INTRODUCED_IN(21); /* fundamentally !__pure2 */
long double nanl(const char*) __pure2 __INTRODUCED_IN(13);
long double nearbyintl(long double) __INTRODUCED_IN(21);
long double nextafterl(long double, long double) __INTRODUCED_IN(21);
double nexttoward(double, long double) __INTRODUCED_IN(18);
long double nextafterl(long double, long double) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
double nexttoward(double, long double) __INTRODUCED_IN(18) __VERSIONER_NO_GUARD;
float nexttowardf(float, long double);
long double nexttowardl(long double, long double) __INTRODUCED_IN(18);
long double nexttowardl(long double, long double) __INTRODUCED_IN(18) __VERSIONER_NO_GUARD;
long double powl(long double, long double) __INTRODUCED_IN(21);
long double remainderl(long double, long double) __INTRODUCED_IN(21);
long double remquol(long double, long double, int*) __INTRODUCED_IN(21);

View File

@ -147,14 +147,23 @@ lldiv_t lldiv(long long, long long) __pure2;
const char* getprogname(void) __INTRODUCED_IN(21);
void setprogname(const char*) __INTRODUCED_IN(21);
int mblen(const char*, size_t) __INTRODUCED_IN_FUTURE;
int mblen(const char*, size_t) __INTRODUCED_IN_FUTURE __VERSIONER_NO_GUARD;
size_t mbstowcs(wchar_t*, const char*, size_t);
int mbtowc(wchar_t*, const char*, size_t) __INTRODUCED_IN(21);
int wctomb(char*, wchar_t) __INTRODUCED_IN(21);
int mbtowc(wchar_t*, const char*, size_t) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
int wctomb(char*, wchar_t) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
size_t wcstombs(char*, const wchar_t*, size_t);
#if __ANDROID_API__ >= 21
size_t __ctype_get_mb_cur_max(void) __INTRODUCED_IN(21);
#define MB_CUR_MAX __ctype_get_mb_cur_max()
#else
/*
* 4 is only true for UTF-8 locales, but that's what we default to. We'll need
* the NDK compatibility library to fix this properly.
*/
#define MB_CUR_MAX 4
#endif
#if defined(__BIONIC_FORTIFY)