Makefile.am: Use it.
2000-10-11 Benjamin Kosnik <bkoz@purist.soma.redhat.com> * libsupc++/Makefile.am: Use it. * libio/Makefile.am: Use it. * libmath/Makefile.am: Use it. * src/Makefile.am: Use it. * Makefile.am (AM_MAKEFLAGS): Remove includes. * acinclude.m4 (GLIBCPP_EXPORT_INCLUES): Move include macros here. (GLIBCPP_EXPORT_FLAGS): Move CXX flag setting here. * configure.in: Use it. * mkcheck.in (SRC_DIR): Use C_INCLUDE_DIR. * src/Makefile.am (CXXCOMPILE): Remove. * src/Makefile.in: Regenerate. * libsupc++/Makefile.am (CXXCOMPILE): Same here. * libsupc++/Makefile.in: Regenerate. * include/c_std/*: Merge with shadow. * include/c_std/bits/*: Same. From-SVN: r36851
This commit is contained in:
parent
1384173a1c
commit
607642b6c2
|
@ -34,39 +34,16 @@
|
|||
#ifndef _CPP_CASSERT
|
||||
#define _CPP_CASSERT 1
|
||||
|
||||
#ifdef _IN_C_LEGACY_ /* sub-included by a C header */
|
||||
// get out of the "legacy"
|
||||
} // close extern "C"
|
||||
} // close namespace _C_legacy::
|
||||
# undef _IN_C_LEGACY_
|
||||
# define _ASSERT_NEED_C_LEGACY_
|
||||
#endif
|
||||
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <assert.h>
|
||||
}
|
||||
|
||||
} // namespace _C_legacy
|
||||
|
||||
|
||||
#undef _IN_C_LEGACY_
|
||||
|
||||
// Expose global C names, including non-standard ones, but shadow
|
||||
// some names and types with the std:: C++ version.
|
||||
|
||||
#ifdef _ASSERT_NEED_C_LEGACY_
|
||||
// dive back into the "swamp"
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# undef _ASSERT_NEED_C_LEGACY_
|
||||
#endif /* _ASSERT_NEED_C_LEGACY_ */
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -33,19 +33,11 @@
|
|||
#ifndef _CPP_CCTYPE
|
||||
#define _CPP_CCTYPE 1
|
||||
|
||||
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
|
||||
// get out of the "legacy"
|
||||
} // close extern "C"
|
||||
} // close namespace _C_legacy::
|
||||
# undef _IN_C_LEGACY_
|
||||
# define _CTYPE_NEED_C_LEGACY_
|
||||
# endif
|
||||
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <ctype.h>
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <ctype.h>
|
||||
}
|
||||
|
||||
inline int
|
||||
|
@ -146,29 +138,8 @@ namespace std {
|
|||
|
||||
# undef _IN_C_LEGACY_
|
||||
|
||||
// Expose global C names, including non-standard ones, but shadow
|
||||
// some names and types with the std:: C++ version.
|
||||
using std::isalnum;
|
||||
using std::isalpha;
|
||||
using std::iscntrl;
|
||||
using std::isdigit;
|
||||
using std::isgraph;
|
||||
using std::islower;
|
||||
using std::isprint;
|
||||
using std::ispunct;
|
||||
using std::isspace;
|
||||
using std::isupper;
|
||||
using std::isxdigit;
|
||||
using std::tolower;
|
||||
using std::toupper;
|
||||
#endif
|
||||
|
||||
|
||||
# ifdef _CTYPE_NEED_C_LEGACY_
|
||||
// dive back into the "swamp"
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# undef _CTYPE_NEED_C_LEGACY_
|
||||
# endif /* _CTYPE_NEED_C_LEGACY_ */
|
||||
|
||||
#endif /*_CPP_CCTYPE*/
|
||||
|
||||
|
|
|
@ -33,19 +33,11 @@
|
|||
#ifndef _CPP_CERRNO
|
||||
#define _CPP_CERRNO 1
|
||||
|
||||
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
|
||||
// get out of the "legacy"
|
||||
} // close extern "C"
|
||||
} // close namespace _C_legacy::
|
||||
# undef _IN_C_LEGACY_
|
||||
# define _ERRNO_NEED_C_LEGACY_
|
||||
# endif
|
||||
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <errno.h>
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <errno.h>
|
||||
}
|
||||
|
||||
// inline int&
|
||||
|
@ -62,17 +54,5 @@ namespace std {
|
|||
|
||||
# undef _IN_C_LEGACY_
|
||||
|
||||
// Expose global C names, including non-standard ones, but shadow
|
||||
// some names and types with the std:: C++ version.
|
||||
using std::errno;
|
||||
|
||||
# ifdef _ERRNO_NEED_C_LEGACY_
|
||||
// dive back into the "swamp"
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# undef _ERRNO_NEED_C_LEGACY_
|
||||
# endif /* _ERRNO_NEED_C_LEGACY_ */
|
||||
|
||||
#endif /*_CPP_CERRNO*/
|
||||
#endif
|
||||
|
||||
|
|
|
@ -34,36 +34,17 @@
|
|||
#ifndef _CPP_CFLOAT
|
||||
#define _CPP_CFLOAT 1
|
||||
|
||||
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
|
||||
// get out of the "legacy"
|
||||
} // close extern "C"
|
||||
} // close namespace _C_legacy::
|
||||
# undef _IN_C_LEGACY_
|
||||
# define _FLOAT_NEED_C_LEGACY_
|
||||
# endif
|
||||
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <float.h>
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <float.h>
|
||||
}
|
||||
} // namespace _C_legacy
|
||||
|
||||
# undef _IN_C_LEGACY_
|
||||
|
||||
// Expose global C names, including non-standard ones, but shadow
|
||||
// some names and types with the std:: C++ version.
|
||||
|
||||
# ifdef _FLOAT_NEED_C_LEGACY_
|
||||
// dive back into the "swamp"
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# undef _FLOAT_NEED_C_LEGACY_
|
||||
# endif /* _FLOAT_NEED_C_LEGACY_ */
|
||||
|
||||
#endif /*_CPP_CFLOAT*/
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -34,36 +34,17 @@
|
|||
#ifndef _CPP_CLIMITS
|
||||
#define _CPP_CLIMTIS 1
|
||||
|
||||
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
|
||||
// get out of the "legacy"
|
||||
} // close extern "C"
|
||||
} // close namespace _C_legacy::
|
||||
# undef _IN_C_LEGACY_
|
||||
# define _LIMITS_NEED_C_LEGACY_
|
||||
# endif
|
||||
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <limits.h>
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <limits.h>
|
||||
}
|
||||
} // namespace _C_legacy
|
||||
|
||||
# undef _IN_C_LEGACY_
|
||||
|
||||
// Expose global C names, including non-standard ones, but shadow
|
||||
// some names and types with the std:: C++ version.
|
||||
|
||||
# ifdef _LIMITS_NEED_C_LEGACY_
|
||||
// dive back into the "swamp"
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# undef _LIMITS_NEED_C_LEGACY_
|
||||
# endif /* _LIMITS_NEED_C_LEGACY_ */
|
||||
|
||||
#endif /*_CPP_CLIMITS*/
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -36,19 +36,11 @@
|
|||
|
||||
# include <bits/std_cstddef.h>
|
||||
|
||||
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
|
||||
// get out of the "legacy"
|
||||
} // close extern "C"
|
||||
} // close namespace _C_legacy::
|
||||
# undef _IN_C_LEGACY_
|
||||
# define _LOCALE_NEED_C_LEGACY_
|
||||
#endif
|
||||
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <locale.h>
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <locale.h>
|
||||
}
|
||||
|
||||
typedef lconv _CPP_lconv_capture;
|
||||
|
@ -70,21 +62,7 @@ namespace std {
|
|||
|
||||
# undef _IN_C_LEGACY_
|
||||
|
||||
// Expose global C names, including non-standard ones, but shadow
|
||||
// some names and types with the std:: C++ version.
|
||||
using std::lconv;
|
||||
using std::setlocale;
|
||||
using std::localeconv;
|
||||
|
||||
# ifdef _LOCALE_NEED_C_LEGACY_
|
||||
// dive back into the "swamp"
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# undef _LOCALE_NEED_C_LEGACY_
|
||||
# endif /* _LOCALE_NEED_C_LEGACY_ */
|
||||
|
||||
#endif /*_CPP_CLOCALE*/
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -34,21 +34,13 @@
|
|||
#ifndef _CPP_CMATH
|
||||
#define _CPP_CMATH 1
|
||||
|
||||
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
|
||||
// get out of the "legacy"
|
||||
} // close extern "C"
|
||||
} // close namespace _C_legacy::
|
||||
# undef _IN_C_LEGACY_
|
||||
# define _MATH_NEED_C_LEGACY_
|
||||
# endif
|
||||
|
||||
# include <bits/c++config.h>
|
||||
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <math.h>
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <math.h>
|
||||
}
|
||||
|
||||
#if _GLIBCPP_HAVE_ACOSF
|
||||
|
@ -543,6 +535,9 @@ namespace _C_legacy {
|
|||
inline long double
|
||||
_CPP_tanh_capture(long double __x) { return tanh(static_cast<double>(__x)); }
|
||||
#endif
|
||||
|
||||
namespace _C_shadow { }
|
||||
|
||||
} // namespace _C_legacy
|
||||
|
||||
# undef abs
|
||||
|
@ -802,252 +797,11 @@ namespace std {
|
|||
|
||||
inline long double
|
||||
tanh(long double __x) { return _C_legacy::_CPP_tanh_capture(__x); }
|
||||
|
||||
// From ISO/IEC 9899:1999
|
||||
inline float
|
||||
absf(float __x) { return _C_legacy::_CPP_fabs_capture(__x); }
|
||||
|
||||
inline float
|
||||
acosf(float __x) { return _C_legacy::_CPP_acos_capture(__x); }
|
||||
|
||||
inline float
|
||||
asinf(float __x) { return _C_legacy::_CPP_asin_capture(__x); }
|
||||
|
||||
inline float
|
||||
atanf(float __x) { return _C_legacy::_CPP_atan_capture(__x); }
|
||||
|
||||
inline float
|
||||
atan2f(float __y, float __x)
|
||||
{ return _C_legacy::_CPP_atan2_capture(__y, __x); }
|
||||
|
||||
inline float
|
||||
ceilf(float __x) { return _C_legacy::_CPP_ceil_capture(__x); }
|
||||
|
||||
inline float
|
||||
cosf(float __x) { return _C_legacy::_CPP_cos_capture(__x); }
|
||||
|
||||
inline float
|
||||
coshf(float __x) { return _C_legacy::_CPP_cosh_capture(__x); }
|
||||
|
||||
inline float
|
||||
expf(float __x) { return _C_legacy::_CPP_exp_capture(__x); }
|
||||
|
||||
inline float
|
||||
fabsf(float __x) { return _C_legacy::_CPP_fabs_capture(__x); }
|
||||
|
||||
inline float
|
||||
floorf(float __x) { return _C_legacy::_CPP_floor_capture(__x); }
|
||||
|
||||
inline float
|
||||
fmodf(float __x, float __y)
|
||||
{ return _C_legacy::_CPP_fmod_capture(__x, __y); }
|
||||
|
||||
inline float
|
||||
frexpf(float __x, int* __exp)
|
||||
{ return _C_legacy::_CPP_frexp_capture(__x, __exp); }
|
||||
|
||||
inline float
|
||||
ldexpf(float __x, int __exp)
|
||||
{ return _C_legacy::_CPP_ldexp_capture(__x, __exp); }
|
||||
|
||||
inline float
|
||||
logf(float __x) { return _C_legacy::_CPP_log_capture(__x); }
|
||||
|
||||
inline float
|
||||
log10f(float __x) { return _C_legacy::_CPP_log10_capture(__x); }
|
||||
|
||||
inline float
|
||||
modff(float __x, float* __iptr)
|
||||
{ return _C_legacy::_CPP_modf_capture(__x, __iptr); }
|
||||
|
||||
inline float
|
||||
powf(float __x, float __y) { return _C_legacy::_CPP_pow_capture(__x, __y); }
|
||||
|
||||
float
|
||||
powf(float, int);
|
||||
|
||||
inline float
|
||||
sinf(float __x) { return _C_legacy::_CPP_sin_capture(__x); }
|
||||
|
||||
inline float
|
||||
sinhf(float __x) { return _C_legacy::_CPP_sinh_capture(__x); }
|
||||
|
||||
inline float
|
||||
sqrtf(float __x) { return _C_legacy::_CPP_sqrt_capture(__x); }
|
||||
|
||||
inline float
|
||||
tanf(float __x) { return _C_legacy::_CPP_tan_capture(__x); }
|
||||
|
||||
inline float
|
||||
tanhf(float __x) { return _C_legacy::_CPP_tanh_capture(__x); }
|
||||
|
||||
// From ISO/IEC 9899:1999
|
||||
inline long double
|
||||
absl(long double __x) { return _C_legacy::_CPP_fabs_capture(__x); }
|
||||
|
||||
inline long double
|
||||
acosl(long double __x) { return _C_legacy::_CPP_acos_capture(__x); }
|
||||
|
||||
inline long double
|
||||
asinl(long double __x) { return _C_legacy::_CPP_asin_capture(__x); }
|
||||
|
||||
inline long double
|
||||
atanl(long double __x) { return _C_legacy::_CPP_atan_capture(__x); }
|
||||
|
||||
inline long double
|
||||
atan2l(long double __y, long double __x)
|
||||
{ return _C_legacy::_CPP_atan2_capture(__y, __x); }
|
||||
|
||||
inline long double
|
||||
ceill(long double __x) { return _C_legacy::_CPP_ceil_capture(__x); }
|
||||
|
||||
inline long double
|
||||
cosl(long double __x) { return _C_legacy::_CPP_cos_capture(__x); }
|
||||
|
||||
inline long double
|
||||
coshl(long double __x) { return _C_legacy::_CPP_cosh_capture(__x); }
|
||||
|
||||
inline long double
|
||||
expl(long double __x) { return _C_legacy::_CPP_exp_capture(__x); }
|
||||
|
||||
inline long double
|
||||
fabsl(long double __x) { return _C_legacy::_CPP_fabs_capture(__x); }
|
||||
|
||||
inline long double
|
||||
floorl(long double __x) { return _C_legacy::_CPP_floor_capture(__x); }
|
||||
|
||||
inline long double
|
||||
fmodl(long double __x, long double __y)
|
||||
{ return _C_legacy::_CPP_fmod_capture(__x, __y); }
|
||||
|
||||
inline long double
|
||||
frexpl(long double __x, int* __exp)
|
||||
{ return _C_legacy::_CPP_frexp_capture(__x, __exp); }
|
||||
|
||||
inline long double
|
||||
ldexpl(long double __x, int __exp)
|
||||
{ return _C_legacy::_CPP_ldexp_capture(__x, __exp); }
|
||||
|
||||
inline long double
|
||||
logl(long double __x) { return _C_legacy::_CPP_log_capture(__x); }
|
||||
|
||||
inline long double
|
||||
log10l(long double __x) { return _C_legacy::_CPP_log10_capture(__x); }
|
||||
|
||||
inline long double
|
||||
modfl(long double __x, long double* __iptr)
|
||||
{ return _C_legacy::_CPP_modf_capture(__x, __iptr); }
|
||||
|
||||
inline long double
|
||||
powl(long double __x, long double __y)
|
||||
{ return _C_legacy::_CPP_pow_capture(__x, __y); }
|
||||
|
||||
long double
|
||||
powl(long double, int);
|
||||
|
||||
inline long double
|
||||
sinl(long double __x) { return _C_legacy::_CPP_sin_capture(__x); }
|
||||
|
||||
inline long double
|
||||
sinhl(long double __x) { return _C_legacy::_CPP_sinh_capture(__x); }
|
||||
|
||||
inline long double
|
||||
sqrtl(long double __x) { return _C_legacy::_CPP_sqrt_capture(__x); }
|
||||
|
||||
inline long double
|
||||
tanl(long double __x) { return _C_legacy::_CPP_tan_capture(__x); }
|
||||
|
||||
inline long double
|
||||
tanhl(long double __x) { return _C_legacy::_CPP_tanh_capture(__x); }
|
||||
} // namespace std
|
||||
|
||||
# undef _IN_C_LEGACY_
|
||||
|
||||
// Expose global C names, including non-standard ones, but shadow
|
||||
// some names and types with the std:: C++ version.
|
||||
using std::abs;
|
||||
using std::acos;
|
||||
using std::asin;
|
||||
using std::atan;
|
||||
using std::atan2;
|
||||
using std::cos;
|
||||
using std::sin;
|
||||
using std::tan;
|
||||
using std::cosh;
|
||||
using std::sinh;
|
||||
using std::tanh;
|
||||
using std::exp;
|
||||
using std::frexp;
|
||||
using std::ldexp;
|
||||
using std::log;
|
||||
using std::log10;
|
||||
using std::modf;
|
||||
using std::pow;
|
||||
using std::sqrt;
|
||||
using std::ceil;
|
||||
using std::fabs;
|
||||
using std::floor;
|
||||
using std::fmod;
|
||||
|
||||
// From ISO/IEC 9899:1999
|
||||
using std::absf;
|
||||
using std::acosf;
|
||||
using std::asinf;
|
||||
using std::atanf;
|
||||
using std::atan2f;
|
||||
using std::cosf;
|
||||
using std::sinf;
|
||||
using std::tanf;
|
||||
using std::coshf;
|
||||
using std::sinhf;
|
||||
using std::tanhf;
|
||||
using std::expf;
|
||||
using std::frexpf;
|
||||
using std::ldexpf;
|
||||
using std::logf;
|
||||
using std::log10f;
|
||||
using std::modff;
|
||||
using std::powf;
|
||||
using std::sqrtf;
|
||||
using std::ceilf;
|
||||
using std::fabsf;
|
||||
using std::floorf;
|
||||
using std::fmodf;
|
||||
|
||||
// From ISO/IEC 9899:1999
|
||||
using std::absl;
|
||||
using std::acosl;
|
||||
using std::asinl;
|
||||
using std::atanl;
|
||||
using std::atan2l;
|
||||
using std::cosl;
|
||||
using std::sinl;
|
||||
using std::tanl;
|
||||
using std::coshl;
|
||||
using std::sinhl;
|
||||
using std::tanhl;
|
||||
using std::expl;
|
||||
using std::frexpl;
|
||||
using std::ldexpl;
|
||||
using std::logl;
|
||||
using std::log10l;
|
||||
using std::modfl;
|
||||
using std::powl;
|
||||
using std::sqrtl;
|
||||
using std::ceill;
|
||||
using std::fabsl;
|
||||
using std::floorl;
|
||||
using std::fmodl;
|
||||
|
||||
# ifdef _MATH_NEED_C_LEGACY_
|
||||
// dive back into the "swamp"
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# undef _MATH_NEED_C_LEGACY_
|
||||
# endif /* _MATH_NEED_C_LEGACY_ */
|
||||
|
||||
#endif /*_CPP_CMATH*/
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -34,19 +34,11 @@
|
|||
#ifndef _CPP_CSETJMP
|
||||
#define _CPP_CSETJMP 1
|
||||
|
||||
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
|
||||
// get out of the "legacy"
|
||||
} // close extern "C"
|
||||
} // close namespace _C_legacy::
|
||||
# undef _IN_C_LEGACY_
|
||||
# define _SETJMP_NEED_C_LEGACY_
|
||||
# endif
|
||||
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <setjmp.h>
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <setjmp.h>
|
||||
}
|
||||
inline int
|
||||
_CPP_setjmp_capture(jmp_buf __jb) { return setjmp(__jb); }
|
||||
|
@ -65,20 +57,7 @@ namespace std {
|
|||
|
||||
# undef _IN_C_LEGACY_
|
||||
|
||||
// Expose global C names, including non-standard ones, but shadow
|
||||
// some names and types with the std:: C++ version.
|
||||
using std::jmp_buf;
|
||||
using std::longjmp;
|
||||
|
||||
# ifdef _SETJMP_NEED_C_LEGACY_
|
||||
// dive back into the "swamp"
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# undef _SETJMP_NEED_C_LEGACY_
|
||||
# endif /* _SETJMP_NEED_C_LEGACY_ */
|
||||
|
||||
#endif /*_CPP_CSETJUMP*/
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -34,23 +34,15 @@
|
|||
#ifndef _CPP_CSIGNAL
|
||||
#define _CPP_CSIGNAL 1
|
||||
|
||||
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
|
||||
// get out of the "legacy"
|
||||
} // close extern "C"
|
||||
} // close namespace _C_legacy::
|
||||
# undef _IN_C_LEGACY_
|
||||
# define _SIGNAL_NEED_C_LEGACY_
|
||||
# endif
|
||||
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# define _IN_C_LEGACY_
|
||||
// XXX
|
||||
# undef __need_sig_atomic_t
|
||||
# undef __need_sigset_t
|
||||
# undef __need_sig_atomic_t
|
||||
# undef __need_sigset_t
|
||||
|
||||
# pragma GCC system_header
|
||||
# include_next <signal.h>
|
||||
# pragma GCC system_header
|
||||
# include_next <signal.h>
|
||||
}
|
||||
} // namespace _C_legacy
|
||||
|
||||
|
@ -67,22 +59,7 @@ namespace std {
|
|||
|
||||
# undef _IN_C_LEGACY_
|
||||
|
||||
// Expose global C names, including non-standard ones, but shadow
|
||||
// some names and types with the std:: C++ version.
|
||||
using std::sig_atomic_t;
|
||||
|
||||
using std::raise;
|
||||
using std::signal;
|
||||
|
||||
# ifdef _SIGNAL_NEED_C_LEGACY_
|
||||
// dive back into the "swamp"
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# undef _SIGNAL_NEED_C_LEGACY_
|
||||
# endif /* _SIGNAL_NEED_C_LEGACY_ */
|
||||
|
||||
#endif /*_CPP_CSIGNAL*/
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -34,14 +34,6 @@
|
|||
#ifndef _CPP_CSTDARG
|
||||
#define _CPP_CSTDARG 1
|
||||
|
||||
#ifdef _IN_C_LEGACY_ /* sub-included by a C header */
|
||||
// get out of the "legacy"
|
||||
} // close extern "C"
|
||||
} // close namespace _C_legacy::
|
||||
# undef _IN_C_LEGACY_
|
||||
# define _STDARG_NEED_C_LEGACY_
|
||||
# endif
|
||||
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
|
@ -58,17 +50,5 @@ namespace std {
|
|||
|
||||
# undef _IN_C_LEGACY_
|
||||
|
||||
// Expose global C names, including non-standard ones, but shadow
|
||||
// some names and types with the std:: C++ version.
|
||||
using std::va_list;
|
||||
|
||||
# ifdef _STDARG_NEED_C_LEGACY_
|
||||
// dive back into the "swamp"
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# undef _STDARG_NEED_C_LEGACY_
|
||||
# endif /* _STDARG_NEED_C_LEGACY_ */
|
||||
|
||||
#endif /*_CPP_CSTDARG*/
|
||||
#endif
|
||||
|
||||
|
|
|
@ -34,28 +34,16 @@
|
|||
#ifndef _CPP_CSTDDEF
|
||||
#define _CPP_CSTDDEF 1
|
||||
|
||||
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
|
||||
// get out of the "legacy"
|
||||
} // close extern "C"
|
||||
} // close namespace _C_legacy::
|
||||
# undef _IN_C_LEGACY_
|
||||
# define _STDDEF_NEED_C_LEGACY_
|
||||
# endif
|
||||
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
|
||||
//# define __need_ptrdiff_t
|
||||
//# define __need_size_t
|
||||
# include_next <stddef.h>
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <stddef.h>
|
||||
}
|
||||
} // namespace _C_legacy
|
||||
|
||||
# undef ptrdiff_t
|
||||
# undef size_t
|
||||
# undef wchar_t
|
||||
|
||||
namespace std {
|
||||
using _C_legacy::ptrdiff_t;
|
||||
|
@ -64,25 +52,7 @@ namespace std {
|
|||
|
||||
# undef _IN_C_LEGACY_
|
||||
|
||||
// Expose global C names, including non-standard ones, but shadow
|
||||
// some names and types with the std:: C++ version.
|
||||
using std::ptrdiff_t;
|
||||
using std::size_t;
|
||||
|
||||
// 3.9.1 Fundamental Types
|
||||
// p 5
|
||||
// wchar_t is a fundamental type
|
||||
// using std::wchar_t;
|
||||
|
||||
# ifdef _STDDEF_NEED_C_LEGACY_
|
||||
// dive back into the "swamp"
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# undef _STDDEF_NEED_C_LEGACY_
|
||||
# endif /* _STDDEF_NEED_C_LEGACY_ */
|
||||
|
||||
#endif /*_CPP_CSTDDEF*/
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -34,23 +34,15 @@
|
|||
#ifndef _CPP_CSTDIO
|
||||
#define _CPP_CSTDIO 1
|
||||
|
||||
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
|
||||
// get out of the "legacy"
|
||||
} // close extern "C"
|
||||
} // close namespace _C_legacy::
|
||||
# undef _IN_C_LEGACY_
|
||||
# define _STDIO_NEED_C_LEGACY_
|
||||
# endif
|
||||
|
||||
# include <bits/std_cstddef.h>
|
||||
# include <bits/std_cstdarg.h>
|
||||
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# undef __need_FILE
|
||||
# pragma GCC system_header
|
||||
# include_next <stdio.h>
|
||||
# define _IN_C_LEGACY_
|
||||
# undef __need_FILE
|
||||
# pragma GCC system_header
|
||||
# include_next <stdio.h>
|
||||
}
|
||||
|
||||
typedef FILE _CPP_FILE_capture;
|
||||
|
@ -287,60 +279,5 @@ namespace std {
|
|||
|
||||
# undef _IN_C_LEGACY_
|
||||
|
||||
// Expose global C names, including non-standard ones, but shadow
|
||||
// some names and types with the std:: C++ version.
|
||||
using std::FILE;
|
||||
using std::fpos_t;
|
||||
|
||||
using std::remove;
|
||||
using std::rename;
|
||||
using std::tmpfile;
|
||||
using std::tmpnam;
|
||||
using std::fclose;
|
||||
using std::fflush;
|
||||
using std::fopen;
|
||||
using std::freopen;
|
||||
using std::setbuf;
|
||||
using std::setvbuf;
|
||||
using std::fprintf;
|
||||
using std::fscanf;
|
||||
using std::printf;
|
||||
using std::scanf;
|
||||
using std::sprintf;
|
||||
using std::sscanf;
|
||||
using std::vfprintf;
|
||||
using std::vprintf;
|
||||
using std::vsprintf;
|
||||
using std::fgetc;
|
||||
using std::fgets;
|
||||
using std::fputc;
|
||||
using std::fputs;
|
||||
using std::getc;
|
||||
using std::getchar;
|
||||
using std::gets;
|
||||
using std::putc;
|
||||
using std::putchar;
|
||||
using std::puts;
|
||||
using std::ungetc;
|
||||
using std::fread;
|
||||
using std::fwrite;
|
||||
using std::fgetpos;
|
||||
using std::fseek;
|
||||
using std::fsetpos;
|
||||
using std::ftell;
|
||||
using std::rewind;
|
||||
using std::clearerr;
|
||||
using std::feof;
|
||||
using std::ferror;
|
||||
using std::perror;
|
||||
|
||||
# ifdef _STDIO_NEED_C_LEGACY_
|
||||
// dive back into the "swamp"
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# undef _STDIO_NEED_C_LEGACY_
|
||||
# endif /* _STDIO_NEED_C_LEGACY_ */
|
||||
|
||||
#endif /*_CPP_CSTDIO*/
|
||||
#endif
|
||||
|
||||
|
|
|
@ -38,14 +38,6 @@
|
|||
#ifndef _CPP_CSTDLIB
|
||||
#define _CPP_CSTDLIB 1
|
||||
|
||||
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
|
||||
// get out of the "legacy"
|
||||
} // close extern "C"
|
||||
} // close namespace _C_legacy::
|
||||
# undef _IN_C_LEGACY_
|
||||
# define _STDLIB_NEED_C_LEGACY_
|
||||
# endif
|
||||
|
||||
# include <bits/c++config.h>
|
||||
# include <bits/std_cstddef.h>
|
||||
|
||||
|
@ -194,58 +186,6 @@ namespace std {
|
|||
|
||||
# undef _IN_C_LEGACY_
|
||||
|
||||
// Expose global C names, including non-standard ones, but shadow
|
||||
// some names and types with the std:: C++ version.
|
||||
using std::div_t;
|
||||
using std::ldiv_t;
|
||||
#ifdef _GLIBCPP_USE_LONG_LONG
|
||||
using std::lldiv_t;
|
||||
#endif
|
||||
|
||||
using std::abort;
|
||||
using std::abs;
|
||||
using std::atexit;
|
||||
using std::atof;
|
||||
using std::atoi;
|
||||
using std::atol;
|
||||
using std::bsearch;
|
||||
using std::calloc;
|
||||
using std::div;
|
||||
using std::exit;
|
||||
using std::free;
|
||||
using std::getenv;
|
||||
using std::labs;
|
||||
using std::ldiv;
|
||||
using std::malloc;
|
||||
using std::mblen;
|
||||
using std::mbstowcs;
|
||||
using std::mbtowc;
|
||||
using std::qsort;
|
||||
using std::rand;
|
||||
using std::realloc;
|
||||
using std::srand;
|
||||
using std::strtod;
|
||||
using std::strtol;
|
||||
using std::strtoul;
|
||||
using std::system;
|
||||
using std::wcstombs;
|
||||
using std::wctomb;
|
||||
|
||||
#ifdef _GLIBCPP_USE_LONG_LONG
|
||||
using std::strtoll;
|
||||
using std::strtoull;
|
||||
using std::strtof;
|
||||
using std::strtold;
|
||||
#endif
|
||||
|
||||
# ifdef _STDLIB_NEED_C_LEGACY_
|
||||
// dive back into the "swamp"
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# undef _STDLIB_NEED_C_LEGACY_
|
||||
# endif /* _STDLIB_NEED_C_LEGACY_ */
|
||||
|
||||
#endif /*_CPP_CSTDLIB*/
|
||||
|
||||
|
||||
|
|
|
@ -34,14 +34,6 @@
|
|||
#ifndef _CPP_CSTRING
|
||||
#define _CPP_CSTRING 1
|
||||
|
||||
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
|
||||
// get out of the "legacy"
|
||||
} // close extern "C"
|
||||
} // close namespace _C_legacy::
|
||||
# undef _IN_C_LEGACY_
|
||||
# define _STRING_NEED_C_LEGACY_
|
||||
# endif
|
||||
|
||||
# if defined __GLIBC__ && __GLIBC__ >= 2
|
||||
// We must not see the optimized string functions GNU libc defines.
|
||||
# define __NO_STRING_INLINES
|
||||
|
@ -283,38 +275,5 @@ namespace std {
|
|||
|
||||
# undef _IN_C_LEGACY_
|
||||
|
||||
// Expose global C names, including non-standard ones, but shadow
|
||||
// some names and types with the std:: C++ version.
|
||||
using std::memcpy;
|
||||
using std::memmove;
|
||||
using std::strcpy;
|
||||
using std::strncpy;
|
||||
using std::strcat;
|
||||
using std::strncat;
|
||||
using std::memcmp;
|
||||
using std::strcmp;
|
||||
using std::strcoll;
|
||||
using std::strncmp;
|
||||
using std::strxfrm;
|
||||
using std::memchr;
|
||||
using std::strchr;
|
||||
using std::strcspn;
|
||||
using std::strpbrk;
|
||||
using std::strrchr;
|
||||
using std::strspn;
|
||||
using std::strstr;
|
||||
using std::strtok;
|
||||
using std::memset;
|
||||
using std::strerror;
|
||||
using std::strlen;
|
||||
|
||||
# ifdef _STRING_NEED_C_LEGACY_
|
||||
// dive back into the "swamp"
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# undef _STRING_NEED_C_LEGACY_
|
||||
# endif /* _STRING_NEED_C_LEGACY_ */
|
||||
|
||||
#endif /*_CPP_CSTRING*/
|
||||
#endif
|
||||
|
||||
|
|
|
@ -34,28 +34,20 @@
|
|||
#ifndef _CPP_CTIME
|
||||
#define _CPP_CTIME 1
|
||||
|
||||
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
|
||||
// get out of the "legacy"
|
||||
} // close extern "C"
|
||||
} // close namespace _C_legacy::
|
||||
# undef _IN_C_LEGACY_
|
||||
# define _TIME_NEED_C_LEGACY_
|
||||
# endif
|
||||
|
||||
# include <bits/std_cstddef.h>
|
||||
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
|
||||
// XXX
|
||||
// glibc 2.1.x time.h is on crack
|
||||
# undef __need_time_t
|
||||
# undef __need_clock_t
|
||||
# undef __need_timespec
|
||||
# undef __need_time_t
|
||||
# undef __need_clock_t
|
||||
# undef __need_timespec
|
||||
|
||||
# include_next <time.h>
|
||||
# include_next <time.h>
|
||||
}
|
||||
|
||||
typedef clock_t _CPP_clock_t_capture;
|
||||
|
@ -111,30 +103,5 @@ namespace std {
|
|||
|
||||
# undef _IN_C_LEGACY_
|
||||
|
||||
// Expose global C names, including non-standard ones, but shadow
|
||||
// some names and types with the std:: C++ version.
|
||||
using std::clock_t;
|
||||
using std::time_t;
|
||||
using std::tm;
|
||||
|
||||
using std::clock;
|
||||
using std::difftime;
|
||||
using std::mktime;
|
||||
using std::time;
|
||||
using std::asctime;
|
||||
using std::ctime;
|
||||
using std::gmtime;
|
||||
using std::localtime;
|
||||
using std::strftime;
|
||||
|
||||
# ifdef _TIME_NEED_C_LEGACY_
|
||||
// dive back into the "swamp"
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# undef _TIME_NEED_C_LEGACY_
|
||||
# endif /* _TIME_NEED_C_LEGACY_ */
|
||||
|
||||
#endif /*_CPP_CTIME*/
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -32,22 +32,13 @@
|
|||
|
||||
#ifndef _CPP_CWCHAR
|
||||
# define _CPP_CWCHAR 1
|
||||
|
||||
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
|
||||
// get out of the "legacy"
|
||||
} // close extern "C"
|
||||
} // close namespace _C_legacy::
|
||||
# undef _IN_C_LEGACY_ /* sub-included by a C header */
|
||||
# define _WCHAR_NEED_C_LEGACY_
|
||||
# endif
|
||||
|
||||
# include <bits/std_cstdio.h>
|
||||
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <wchar.h>
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <wchar.h>
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
@ -98,6 +89,7 @@ namespace _C_legacy {
|
|||
#endif
|
||||
} // namespace _C_legacy
|
||||
|
||||
# undef wchar_t
|
||||
# undef wint_t
|
||||
# undef mbstate_t
|
||||
|
||||
|
@ -162,7 +154,8 @@ namespace _C_legacy {
|
|||
# undef wcsrtombs
|
||||
|
||||
namespace std {
|
||||
using _C_legacy::wint_t;
|
||||
|
||||
using _C_legacy::wint_t;
|
||||
using _C_legacy::mbstate_t;
|
||||
|
||||
#if 0
|
||||
|
@ -274,92 +267,8 @@ namespace std {
|
|||
|
||||
# undef _IN_C_LEGACY_
|
||||
|
||||
// Expose global C names, including non-standard ones, but shadow
|
||||
// some names and types with the std:: C++ version.
|
||||
using std::wint_t;
|
||||
using std::mbstate_t;
|
||||
|
||||
#if 0
|
||||
using std::fwprintf;
|
||||
using std::fwscanf;
|
||||
using std::swprintf;
|
||||
using std::swscanf;
|
||||
using std::vfwprintf;
|
||||
using std::vfwscanf;
|
||||
using std::vswprintf;
|
||||
using std::vswscanf;
|
||||
using std::vwprintf;
|
||||
using std::vwscanf;
|
||||
using std::wprintf;
|
||||
using std::wscanf;
|
||||
using std::fgetwc;
|
||||
using std::fgetws;
|
||||
using std::fputwc;
|
||||
using std::fputws;
|
||||
using std::fwide;
|
||||
using std::getwc;
|
||||
using std::getwchar;
|
||||
using std::putwc;
|
||||
using std::putwchar;
|
||||
using std::ungetwc;
|
||||
#endif
|
||||
|
||||
using std::wcstod;
|
||||
using std::wcstof;
|
||||
using std::wcstold;
|
||||
using std::wcstol;
|
||||
using std::wcstoll;
|
||||
using std::wcstoul;
|
||||
using std::wcstoull;
|
||||
using std::wcscpy;
|
||||
using std::wcsncpy;
|
||||
using std::wcscat;
|
||||
using std::wcsncat;
|
||||
|
||||
#if 0
|
||||
using std::wcsmp;
|
||||
#endif
|
||||
|
||||
using std::wcscoll;
|
||||
using std::wcsncmp;
|
||||
using std::wcsxfrm;
|
||||
using std::wcschr;
|
||||
using std::wcscspn;
|
||||
using std::wcslen;
|
||||
using std::wcspbrk;
|
||||
using std::wcsrchr;
|
||||
using std::wcsspn;
|
||||
using std::wcsstr;
|
||||
using std::wcstok;
|
||||
using std::wmemchr;
|
||||
using std::wmemcmp;
|
||||
using std::wmemcpy;
|
||||
using std::wmemmove;
|
||||
using std::wmemset;
|
||||
|
||||
#if 0
|
||||
using std::wcsftime;
|
||||
#endif
|
||||
|
||||
using std::btowc;
|
||||
using std::wctob;
|
||||
using std::mbsinit;
|
||||
using std::mbrlen;
|
||||
using std::mbrtowc;
|
||||
using std::wcrtomb;
|
||||
using std::mbsrtowcs;
|
||||
using std::wcsrtombs;
|
||||
|
||||
# ifdef _WCHAR_NEED_C_LEGACY_
|
||||
// dive back into the "swamp"
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# undef _WCHAR_NEED_C_LEGACY_
|
||||
# endif /* _WCHAR_NEED_C_LEGACY_ */
|
||||
|
||||
#endif /*_CPP_CWCHAR*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -34,24 +34,17 @@
|
|||
#ifndef _CPP_CWCTYPE
|
||||
#define _CPP_CWCTYPE 1
|
||||
|
||||
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
|
||||
// get out of the "legacy"
|
||||
} // close extern "C"
|
||||
} // close namespace _C_legacy::
|
||||
# undef _IN_C_LEGACY_
|
||||
# define _CWCHAR_NEED_C_LEGACY_
|
||||
# endif
|
||||
|
||||
# include <bits/std_cwchar.h>
|
||||
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <wctype.h>
|
||||
# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <wctype.h>
|
||||
}
|
||||
} // namespace _C_legacy
|
||||
|
||||
|
||||
# undef wctype_t
|
||||
# undef wctrans_t
|
||||
# undef iswalpha
|
||||
|
@ -132,36 +125,5 @@ namespace std {
|
|||
|
||||
# undef _IN_C_LEGACY_
|
||||
|
||||
// Expose global C names, including non-standard ones, but shadow
|
||||
// some names and types with the std:: C++ version.
|
||||
using std::wint_t;
|
||||
using std::wctype_t;
|
||||
using std::wctrans_t;
|
||||
using std::iswalpha;
|
||||
using std::iswupper;
|
||||
using std::iswlower;
|
||||
using std::iswdigit;
|
||||
using std::iswxdigit;
|
||||
using std::iswalnum;
|
||||
using std::iswspace;
|
||||
using std::iswpunct;
|
||||
using std::iswprint;
|
||||
using std::iswgraph;
|
||||
using std::iswcntrl;
|
||||
using std::iswctype;
|
||||
using std::towctrans;
|
||||
using std::towlower;
|
||||
using std::towupper;
|
||||
using std::wctrans;
|
||||
using std::wctype;
|
||||
|
||||
# ifdef _CWCHAR_NEED_C_LEGACY_
|
||||
// dive back into the "swamp"
|
||||
namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
# undef _CWCHAR_NEED_C_LEGACY_
|
||||
# endif /* _CWCHAR_NEED_C_LEGACY_ */
|
||||
|
||||
#endif /*_CPP_CWCTYPE*/
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue