diff options
Diffstat (limited to '9/sources/cxx-stl/llvm-libc++/libcxx/include/cstdio')
-rw-r--r-- | 9/sources/cxx-stl/llvm-libc++/libcxx/include/cstdio | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/9/sources/cxx-stl/llvm-libc++/libcxx/include/cstdio b/9/sources/cxx-stl/llvm-libc++/libcxx/include/cstdio index 7787fad..8f2a7b0 100644 --- a/9/sources/cxx-stl/llvm-libc++/libcxx/include/cstdio +++ b/9/sources/cxx-stl/llvm-libc++/libcxx/include/cstdio @@ -126,6 +126,19 @@ inline _LIBCPP_INLINE_VISIBILITY int __libcpp_putc(int __c, FILE* __stream) {ret inline _LIBCPP_INLINE_VISIBILITY int putc(int __c, FILE* __stream) {return __libcpp_putc(__c, __stream);} #endif // putc +#ifdef __ANDROID__ +// In bionic's stdio.h, putchar appears as both a function prototype and a macro (later +// in the same header). Because it's defined as a macro, the following code snippet replaces +// it with a function but with *different* visibility. GCC 4.x complains [-Wattributes] +// +// include/stdio.h:236:5: warning: conflicts with previous declaration here [-Wattributes] +// int putchar(int); +// +// Undefine putchar to avoid redefinition, and putchar does exist in libc.so +// +#undef putchar +#endif + #ifdef putchar inline _LIBCPP_INLINE_VISIBILITY int __libcpp_putchar(int __c) {return putchar(__c);} #undef putchar |