libstdc++: use extern "C++" in all our C++ system headers.
This is needed to build an independent toolchain with g++ that doesn't think that all these headers are in C. Change-Id: Ie9a8ccfcab7780d6a4e5722777d61c2b1b312001
This commit is contained in:
parent
fa5755ae98
commit
0621a279ad
@ -36,6 +36,8 @@
|
|||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
extern "C++" {
|
||||||
|
|
||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
using ::isalnum;
|
using ::isalnum;
|
||||||
@ -53,4 +55,6 @@ using ::tolower;
|
|||||||
using ::toupper;
|
using ::toupper;
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
|
} // extern C++
|
||||||
|
|
||||||
#endif // BIONIC_LIBSTDCPP_INCLUDE_CCTYPE__
|
#endif // BIONIC_LIBSTDCPP_INCLUDE_CCTYPE__
|
||||||
|
@ -37,6 +37,8 @@
|
|||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
extern "C++" {
|
||||||
|
|
||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
// Functions.
|
// Functions.
|
||||||
@ -68,4 +70,6 @@ using ::floor;
|
|||||||
using ::fmod;
|
using ::fmod;
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
|
} // extern C++
|
||||||
|
|
||||||
#endif // BIONIC_LIBSTDCPP_INCLUDE_CMATH__
|
#endif // BIONIC_LIBSTDCPP_INCLUDE_CMATH__
|
||||||
|
@ -36,6 +36,8 @@
|
|||||||
|
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
|
|
||||||
|
extern "C++" {
|
||||||
|
|
||||||
#ifndef setjmp
|
#ifndef setjmp
|
||||||
#define setjmp(env) setjmp (env)
|
#define setjmp(env) setjmp (env)
|
||||||
#endif
|
#endif
|
||||||
@ -46,4 +48,6 @@ using ::jmp_buf;
|
|||||||
using ::longjmp;
|
using ::longjmp;
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
|
} // extern C++
|
||||||
|
|
||||||
#endif // BIONIC_LIBSTDCPP_INCLUDE_CSETJMP__
|
#endif // BIONIC_LIBSTDCPP_INCLUDE_CSETJMP__
|
||||||
|
@ -36,6 +36,8 @@
|
|||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
|
extern "C++" {
|
||||||
|
|
||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
using ::sig_atomic_t;
|
using ::sig_atomic_t;
|
||||||
@ -43,4 +45,6 @@ using ::signal;
|
|||||||
using ::raise;
|
using ::raise;
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
|
} // extern C++
|
||||||
|
|
||||||
#endif // BIONIC_LIBSTDCPP_INCLUDE_CSIGNAL__
|
#endif // BIONIC_LIBSTDCPP_INCLUDE_CSIGNAL__
|
||||||
|
@ -38,9 +38,13 @@
|
|||||||
*/
|
*/
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
extern "C++" {
|
||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
using ::ptrdiff_t;
|
using ::ptrdiff_t;
|
||||||
using ::size_t;
|
using ::size_t;
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
|
} // extern C++
|
||||||
|
|
||||||
#endif // BIONIC_LIBSTDCPP_INCLUDE_CSTDDEF__
|
#endif // BIONIC_LIBSTDCPP_INCLUDE_CSTDDEF__
|
||||||
|
@ -36,6 +36,8 @@
|
|||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
extern "C++" {
|
||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
using ::FILE;
|
using ::FILE;
|
||||||
using ::fpos_t;
|
using ::fpos_t;
|
||||||
@ -89,4 +91,6 @@ using ::vsnprintf;
|
|||||||
using ::vsscanf;
|
using ::vsscanf;
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
|
} // extern C++
|
||||||
|
|
||||||
#endif // BIONIC_LIBSTDCPP_INCLUDE_CSTDIO__
|
#endif // BIONIC_LIBSTDCPP_INCLUDE_CSTDIO__
|
||||||
|
@ -35,6 +35,8 @@
|
|||||||
*/
|
*/
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
extern "C++" {
|
||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
|
|
||||||
using ::exit;
|
using ::exit;
|
||||||
@ -110,4 +112,6 @@ using ::wctomb;
|
|||||||
using ::wcstombs;
|
using ::wcstombs;
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
|
} // extern C++
|
||||||
|
|
||||||
#endif // BIONIC_LIBSTDCPP_INCLUDE_CSTDLIB__
|
#endif // BIONIC_LIBSTDCPP_INCLUDE_CSTDLIB__
|
||||||
|
@ -37,6 +37,8 @@
|
|||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
extern "C++" {
|
||||||
|
|
||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
using ::memchr;
|
using ::memchr;
|
||||||
@ -63,4 +65,6 @@ using ::strtok;
|
|||||||
using ::strxfrm;
|
using ::strxfrm;
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
|
} // extern C++
|
||||||
|
|
||||||
#endif // BIONIC_LIBSTDCPP_INCLUDE_CSTRING__
|
#endif // BIONIC_LIBSTDCPP_INCLUDE_CSTRING__
|
||||||
|
@ -37,6 +37,8 @@
|
|||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
extern "C++" {
|
||||||
|
|
||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
// Types.
|
// Types.
|
||||||
@ -56,4 +58,6 @@ using ::localtime;
|
|||||||
using ::strftime;
|
using ::strftime;
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
|
} // extern C++
|
||||||
|
|
||||||
#endif // BIONIC_LIBSTDCPP_INCLUDE_CTIME__
|
#endif // BIONIC_LIBSTDCPP_INCLUDE_CTIME__
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
|
extern "C++" {
|
||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
struct nothrow_t {};
|
struct nothrow_t {};
|
||||||
extern const nothrow_t nothrow;
|
extern const nothrow_t nothrow;
|
||||||
@ -25,4 +27,6 @@ inline void* operator new[](std::size_t, void* p) { return p; }
|
|||||||
inline void operator delete(void*, void*) { }
|
inline void operator delete(void*, void*) { }
|
||||||
inline void operator delete[](void*, void*) { }
|
inline void operator delete[](void*, void*) { }
|
||||||
|
|
||||||
|
} // extern C++
|
||||||
|
|
||||||
#endif // __NEW__
|
#endif // __NEW__
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#ifndef _TYPEINFO_HEADER_GAURD
|
#ifndef _TYPEINFO_HEADER_GAURD
|
||||||
#define _TYPEINFO_HEADER_GAURD
|
#define _TYPEINFO_HEADER_GAURD
|
||||||
|
|
||||||
|
extern "C++" {
|
||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
class type_info;
|
class type_info;
|
||||||
@ -25,4 +26,6 @@ private:
|
|||||||
type_info & operator=(type_info const & right);
|
type_info & operator=(type_info const & right);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // C++
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user