From d8147b1eb1f1c548018b4ae1456cb15749f03b28 Mon Sep 17 00:00:00 2001 From: Benjamin Kosnik Date: Thu, 21 Dec 2000 22:46:27 +0000 Subject: [PATCH] configure.in: Change GLIBCPP_ENABLE_SHADOW to GLIBCPP_ENABLE_CHEADERS. 2000-12-21 Benjamin Kosnik * configure.in: Change GLIBCPP_ENABLE_SHADOW to GLIBCPP_ENABLE_CHEADERS. * acinclude.m4 (GLIBCPP_ENABLE_SHADOW): Change to ENABLE_CHEADERS. C_INCLUDE_DIR defaults to c_std from c. * aclocal.m4: Regenerate. * configure: Regenerate. * include/c: Move to ... * include/c_std: ...here. * include/c_std: Move to ... * include/c_shadow: ...here. * include/c: Repopulate, with simple headers. * docs/html/configopts.html: Adjust docs. From-SVN: r38430 --- libstdc++-v3/include/c/bits/std_cassert.h | 12 +- libstdc++-v3/include/c/bits/std_cctype.h | 50 +- libstdc++-v3/include/c/bits/std_cerrno.h | 11 +- libstdc++-v3/include/c/bits/std_cfloat.h | 3 +- libstdc++-v3/include/c/bits/std_climits.h | 7 +- libstdc++-v3/include/c/bits/std_clocale.h | 12 +- libstdc++-v3/include/c/bits/std_cmath.h | 552 +----------- libstdc++-v3/include/c/bits/std_csetjmp.h | 8 +- libstdc++-v3/include/c/bits/std_csignal.h | 9 +- libstdc++-v3/include/c/bits/std_cstdarg.h | 7 +- libstdc++-v3/include/c/bits/std_cstddef.h | 8 +- libstdc++-v3/include/c/bits/std_cstdio.h | 75 +- libstdc++-v3/include/c/bits/std_cstdlib.h | 86 +- libstdc++-v3/include/c/bits/std_cstring.h | 31 +- libstdc++-v3/include/c/bits/std_ctime.h | 19 +- libstdc++-v3/include/c/bits/std_cwchar.h | 117 +-- libstdc++-v3/include/c/bits/std_cwctype.h | 54 +- libstdc++-v3/include/c_shadow/assert.h | 55 ++ .../include/c_shadow/bits/std_cassert.h | 61 ++ .../include/c_shadow/bits/std_cctype.h | 145 +++ .../include/c_shadow/bits/std_cerrno.h | 48 + .../include/c_shadow/bits/std_cfloat.h | 54 ++ .../include/c_shadow/bits/std_climits.h | 57 ++ .../include/c_shadow/bits/std_clocale.h | 70 ++ .../include/c_shadow/bits/std_cmath.h | 833 ++++++++++++++++++ .../include/c_shadow/bits/std_csetjmp.h | 63 ++ .../include/c_shadow/bits/std_csignal.h | 67 ++ .../include/c_shadow/bits/std_cstdarg.h | 54 ++ .../include/c_shadow/bits/std_cstddef.h | 59 ++ .../include/c_shadow/bits/std_cstdio.h | 283 ++++++ .../include/c_shadow/bits/std_cstdlib.h | 197 +++++ .../include/c_shadow/bits/std_cstring.h | 279 ++++++ .../include/c_shadow/bits/std_ctime.h | 107 +++ .../include/c_shadow/bits/std_cwchar.h | 275 ++++++ .../include/c_shadow/bits/std_cwctype.h | 129 +++ .../include/c_shadow/bits/wrap_fcntl.h | 92 ++ .../include/c_shadow/bits/wrap_features.h | 51 ++ .../include/c_shadow/bits/wrap_iconv.h | 51 ++ .../include/c_shadow/bits/wrap_iolibio.h | 50 ++ .../include/c_shadow/bits/wrap_langinfo.h | 49 ++ .../include/c_shadow/bits/wrap_libio.h | 50 ++ .../include/c_shadow/bits/wrap_libioP.h | 50 ++ .../include/c_shadow/bits/wrap_pthread.h | 81 ++ .../include/c_shadow/bits/wrap_unistd.h | 47 + libstdc++-v3/include/c_shadow/ctype.h | 67 ++ libstdc++-v3/include/c_shadow/errno.h | 56 ++ libstdc++-v3/include/c_shadow/fcntl.h | 63 ++ libstdc++-v3/include/c_shadow/features.h | 58 ++ libstdc++-v3/include/c_shadow/float.h | 54 ++ libstdc++-v3/include/c_shadow/iconv.h | 66 ++ libstdc++-v3/include/c_shadow/iolibio.h | 58 ++ libstdc++-v3/include/c_shadow/langinfo.h | 55 ++ libstdc++-v3/include/c_shadow/libio.h | 81 ++ libstdc++-v3/include/c_shadow/libioP.h | 64 ++ libstdc++-v3/include/c_shadow/limits.h | 54 ++ libstdc++-v3/include/c_shadow/locale.h | 57 ++ libstdc++-v3/include/c_shadow/math.h | 131 +++ libstdc++-v3/include/c_shadow/pthread.h | 86 ++ libstdc++-v3/include/c_shadow/setjmp.h | 56 ++ libstdc++-v3/include/c_shadow/signal.h | 58 ++ libstdc++-v3/include/c_shadow/stdarg.h | 55 ++ libstdc++-v3/include/c_shadow/stddef.h | 60 ++ libstdc++-v3/include/c_shadow/stdio.h | 97 ++ libstdc++-v3/include/c_shadow/stdlib.h | 101 +++ libstdc++-v3/include/c_shadow/string.h | 76 ++ libstdc++-v3/include/c_shadow/sys/cdefs.h | 49 ++ libstdc++-v3/include/c_shadow/time.h | 67 ++ libstdc++-v3/include/c_shadow/unistd.h | 101 +++ libstdc++-v3/include/c_shadow/wchar.h | 131 +++ libstdc++-v3/include/c_shadow/wctype.h | 74 ++ 70 files changed, 5249 insertions(+), 1044 deletions(-) create mode 100644 libstdc++-v3/include/c_shadow/assert.h create mode 100644 libstdc++-v3/include/c_shadow/bits/std_cassert.h create mode 100644 libstdc++-v3/include/c_shadow/bits/std_cctype.h create mode 100644 libstdc++-v3/include/c_shadow/bits/std_cerrno.h create mode 100644 libstdc++-v3/include/c_shadow/bits/std_cfloat.h create mode 100644 libstdc++-v3/include/c_shadow/bits/std_climits.h create mode 100644 libstdc++-v3/include/c_shadow/bits/std_clocale.h create mode 100644 libstdc++-v3/include/c_shadow/bits/std_cmath.h create mode 100644 libstdc++-v3/include/c_shadow/bits/std_csetjmp.h create mode 100644 libstdc++-v3/include/c_shadow/bits/std_csignal.h create mode 100644 libstdc++-v3/include/c_shadow/bits/std_cstdarg.h create mode 100644 libstdc++-v3/include/c_shadow/bits/std_cstddef.h create mode 100644 libstdc++-v3/include/c_shadow/bits/std_cstdio.h create mode 100644 libstdc++-v3/include/c_shadow/bits/std_cstdlib.h create mode 100644 libstdc++-v3/include/c_shadow/bits/std_cstring.h create mode 100644 libstdc++-v3/include/c_shadow/bits/std_ctime.h create mode 100644 libstdc++-v3/include/c_shadow/bits/std_cwchar.h create mode 100644 libstdc++-v3/include/c_shadow/bits/std_cwctype.h create mode 100644 libstdc++-v3/include/c_shadow/bits/wrap_fcntl.h create mode 100644 libstdc++-v3/include/c_shadow/bits/wrap_features.h create mode 100644 libstdc++-v3/include/c_shadow/bits/wrap_iconv.h create mode 100644 libstdc++-v3/include/c_shadow/bits/wrap_iolibio.h create mode 100644 libstdc++-v3/include/c_shadow/bits/wrap_langinfo.h create mode 100644 libstdc++-v3/include/c_shadow/bits/wrap_libio.h create mode 100644 libstdc++-v3/include/c_shadow/bits/wrap_libioP.h create mode 100644 libstdc++-v3/include/c_shadow/bits/wrap_pthread.h create mode 100644 libstdc++-v3/include/c_shadow/bits/wrap_unistd.h create mode 100644 libstdc++-v3/include/c_shadow/ctype.h create mode 100644 libstdc++-v3/include/c_shadow/errno.h create mode 100644 libstdc++-v3/include/c_shadow/fcntl.h create mode 100644 libstdc++-v3/include/c_shadow/features.h create mode 100644 libstdc++-v3/include/c_shadow/float.h create mode 100644 libstdc++-v3/include/c_shadow/iconv.h create mode 100644 libstdc++-v3/include/c_shadow/iolibio.h create mode 100644 libstdc++-v3/include/c_shadow/langinfo.h create mode 100644 libstdc++-v3/include/c_shadow/libio.h create mode 100644 libstdc++-v3/include/c_shadow/libioP.h create mode 100644 libstdc++-v3/include/c_shadow/limits.h create mode 100644 libstdc++-v3/include/c_shadow/locale.h create mode 100644 libstdc++-v3/include/c_shadow/math.h create mode 100644 libstdc++-v3/include/c_shadow/pthread.h create mode 100644 libstdc++-v3/include/c_shadow/setjmp.h create mode 100644 libstdc++-v3/include/c_shadow/signal.h create mode 100644 libstdc++-v3/include/c_shadow/stdarg.h create mode 100644 libstdc++-v3/include/c_shadow/stddef.h create mode 100644 libstdc++-v3/include/c_shadow/stdio.h create mode 100644 libstdc++-v3/include/c_shadow/stdlib.h create mode 100644 libstdc++-v3/include/c_shadow/string.h create mode 100644 libstdc++-v3/include/c_shadow/sys/cdefs.h create mode 100644 libstdc++-v3/include/c_shadow/time.h create mode 100644 libstdc++-v3/include/c_shadow/unistd.h create mode 100644 libstdc++-v3/include/c_shadow/wchar.h create mode 100644 libstdc++-v3/include/c_shadow/wctype.h diff --git a/libstdc++-v3/include/c/bits/std_cassert.h b/libstdc++-v3/include/c/bits/std_cassert.h index e06927493ab..32928380ba3 100644 --- a/libstdc++-v3/include/c/bits/std_cassert.h +++ b/libstdc++-v3/include/c/bits/std_cassert.h @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 2000 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -37,13 +37,3 @@ #pragma GCC system_header #include - - - - - - - - - - diff --git a/libstdc++-v3/include/c/bits/std_cctype.h b/libstdc++-v3/include/c/bits/std_cctype.h index a6a882bc8a2..5a423a08b8f 100644 --- a/libstdc++-v3/include/c/bits/std_cctype.h +++ b/libstdc++-v3/include/c/bits/std_cctype.h @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 2000 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -36,55 +36,7 @@ #ifndef _CPP_CCTYPE #define _CPP_CCTYPE 1 -#include - #pragma GCC system_header #include -// Get rid of those macros defined in in lieu of real functions. -#undef isalnum -#undef isalpha -#undef isblank -#undef iscntrl -#undef isdigit -#undef isgraph -#undef islower -#undef isprint -#undef ispunct -#undef isspace -#undef isupper -#undef isxdigit -#undef tolower -#undef toupper - -namespace std -{ - extern "C" int isalnum(int __c); - extern "C" int isalpha(int __c); - extern "C" int isblank(int __c); - extern "C" int iscntrl(int __c); - extern "C" int isdigit(int __c); - extern "C" int isgraph(int __c); - extern "C" int islower(int __c); - extern "C" int isprint(int __c); - extern "C" int ispunct(int __c); - extern "C" int isspace(int __c); - extern "C" int isupper(int __c); - extern "C" int isxdigit(int __c); - extern "C" int tolower(int __c); - extern "C" int toupper(int __c); -} - #endif - - - - - - - - - - - - diff --git a/libstdc++-v3/include/c/bits/std_cerrno.h b/libstdc++-v3/include/c/bits/std_cerrno.h index 682882768b3..23a0060a884 100644 --- a/libstdc++-v3/include/c/bits/std_cerrno.h +++ b/libstdc++-v3/include/c/bits/std_cerrno.h @@ -1,6 +1,6 @@ // The -*- C++ -*- error number header. -// Copyright (C) 1997-1999 Free Software Foundation, Inc. +// Copyright (C) 2000 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -39,13 +39,4 @@ #pragma GCC system_header #include -namespace std -{ - extern "C" int errno; -} - #endif - - - - diff --git a/libstdc++-v3/include/c/bits/std_cfloat.h b/libstdc++-v3/include/c/bits/std_cfloat.h index 1444be1ecfb..744699709e5 100644 --- a/libstdc++-v3/include/c/bits/std_cfloat.h +++ b/libstdc++-v3/include/c/bits/std_cfloat.h @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 2000 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -40,4 +40,3 @@ #include #endif - diff --git a/libstdc++-v3/include/c/bits/std_climits.h b/libstdc++-v3/include/c/bits/std_climits.h index 071dd0594f9..05795a6adb6 100644 --- a/libstdc++-v3/include/c/bits/std_climits.h +++ b/libstdc++-v3/include/c/bits/std_climits.h @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 2000 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -40,8 +40,3 @@ #include #endif - - - - - diff --git a/libstdc++-v3/include/c/bits/std_clocale.h b/libstdc++-v3/include/c/bits/std_clocale.h index 18d73dd8cd4..69ea1f6912c 100644 --- a/libstdc++-v3/include/c/bits/std_clocale.h +++ b/libstdc++-v3/include/c/bits/std_clocale.h @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 2000 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -39,14 +39,4 @@ #pragma GCC system_header #include -namespace std -{ - using ::lconv; - extern "C" char* setlocale(int, const char*); - extern "C" struct lconv* localeconv(void); -} - #endif - - - diff --git a/libstdc++-v3/include/c/bits/std_cmath.h b/libstdc++-v3/include/c/bits/std_cmath.h index 01cf652548d..2625eac91fb 100644 --- a/libstdc++-v3/include/c/bits/std_cmath.h +++ b/libstdc++-v3/include/c/bits/std_cmath.h @@ -1,6 +1,6 @@ // -*- C++ -*- C math library. -// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 2000 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -35,558 +35,8 @@ #ifndef _CPP_CMATH #define _CPP_CMATH 1 - -#include -#include #pragma GCC system_header #include -namespace std -{ - // Forward declaration of a helper function. This really should be - // an `exported' forward declaration. - template _Tp __cmath_power(_Tp, unsigned int); - - template - inline _Tp - __cmath_abs(_Tp __x) - { - return __x < _Tp() ? -__x : __x; - } - - inline long - abs(long __i) { return ::labs(__i); } - - inline ldiv_t - div(long __i, long __j) { return ::ldiv(__i, __j); } - -#if _GLIBCPP_HAVE___BUILTIN_FABSF - inline float - abs(float __x) { return __builtin_fabsf(__x); } -#elif _GLIBCPP_HAVE_FABSF - inline float - abs(float __x) { return ::fabsf(__x); } -#else - inline float - abs(float __x) { return __cmath_abs(__x); } -#endif - -#if _GLIBCPP_HAVE_ACOSF - inline float - acos(float __x) { return ::acosf(__x); } -#else - inline float - acos(float __x) { return ::acos(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_ASINF - inline float - asin(float __x) { return ::asinf(__x); } -#else - inline float - asin(float __x) { return ::asin(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_ATANF - inline float - atan(float __x) { return ::atanf(__x); } -#else - inline float - atan(float __x) { return ::atan(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_ATAN2F - inline float - atan2(float __y, float __x) { return ::atan2f(__y, __x); } -#else - inline float - atan2(float __y, float __x) - { return ::atan2(static_cast(__y), static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_CEILF - inline float - ceil(float __x) { return ::ceilf(__x); } -#else - inline float - ceil(float __x) { return ::ceil(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE___BUILTIN_COSF - inline float - cos(float __x) { return __builtin_cosf(__x); } -#elif _GLIBCPP_HAVE_COSF - inline float - cos(float __x) { return ::cosf(__x); } -#else - inline float - cos(float __x) { return ::cos(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_COSHF - inline float - cosh(float __x) { return ::coshf(__x); } -#else - inline float - cosh(float __x) { return ::cosh(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_EXPF - inline float - exp(float __x) { return ::expf(__x); } -#else - inline float - exp(float __x) { return ::exp(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE___BUILTIN_FABSF - inline float - fabs(float __x) { return __builtin_fabsf(__x); } -#elif _GLIBCPP_HAVE_FABSF - inline float - fabs(float __x) { return ::fabsf(__x); } -#else - inline float - fabs(float __x) { return __cmath_abs(__x); } -#endif - -#if _GLIBCPP_HAVE_FLOORF - inline float - floor(float __x) { return ::floorf(__x); } -#else - inline float - floor(float __x) { return ::floor(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_FMODF - inline float - fmod(float __x, float __y) { return ::fmodf(__x, __y); } -#else - inline float - fmod(float __x, float __y) - { return ::fmod(static_cast(__x), static_cast(__y)); } -#endif - -#if _GLIBCPP_HAVE_FREXPF - inline float - frexp(float __x, int* __exp) { return ::frexpf(__x, __exp); } -#else - inline float - frexp(float __x, int* __exp) { return ::frexp(__x, __exp); } -#endif - -#if _GLIBCPP_HAVE_LDEXPF - inline float - ldexp(float __x, int __exp) { return ::ldexpf(__x, __exp); } -#else - inline float - ldexp(float __x, int __exp) - { return ::ldexp(static_cast(__x), __exp); } -#endif - -#if _GLIBCPP_HAVE_LOGF - inline float - log(float __x) { return ::logf(__x); } -#else - inline float log(float __x) - { return ::log(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_LOG10F - inline float - log10(float __x) { return ::log10f(__x); } -#else - inline float - log10(float __x) { return ::log10(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_MODFF - inline float - modf(float __x, float* __iptr) { return ::modff(__x, __iptr); } -#else - inline float - modf(float __x, float* __iptr) - { - double __tmp; - double __res = ::modf(static_cast(__x), &__tmp); - *__iptr = static_cast(__tmp); - return __res; - } -#endif - - template - inline _Tp - __pow_helper(_Tp __x, int __n) - { - return __n < 0 - ? _Tp(1)/__cmath_power(__x, -__n) - : __cmath_power(__x, __n); - } - -#if _GLIBCPP_HAVE_POWF - inline float - pow(float __x, float __y) { return ::powf(__x, __y); } -#else - inline float - pow(float __x, float __y) - { return ::pow(static_cast(__x), static_cast(__y)); } -#endif - - inline float - pow(float __x, int __n) - { - return __pow_helper(__x, __n); - } - -#if _GLIBCPP_HAVE___BUILTIN_SINF - inline float - sin(float __x) { return __builtin_sinf(__x); } -#elif _GLIBCPP_HAVE_SINF - inline float - sin(float __x) { return ::sinf(__x); } -#else - inline float - sin(float __x) { return ::sin(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_SINHF - inline float - sinh(float __x) { return ::sinhf(__x); } -#else - inline float - sinh(float __x) { return ::sinh(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE___BUILTIN_SQRTF - inline float - sqrt(float __x) { return __builtin_sqrtf(__x); } -#elif _GLIBCPP_HAVE_SQRTF - inline float - sqrt(float __x) { return ::sqrtf(__x); } -#else - inline float - sqrt(float __x) { return ::sqrt(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_TANF - inline float - tan(float __x) { return ::tanf(__x); } -#else - inline float - tan(float __x) { return ::tan(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_TANHF - inline float - tanh(float __x) { return ::tanhf(__x); } -#else - inline float - tanh(float __x) { return ::tanh(static_cast(__x)); } -#endif - - - extern "C" double acos(double __x); - - extern "C" double asin(double __x); - - extern "C" double atan(double __x); - - extern "C" double atan2(double __y, double __x); - - extern "C" double ceil(double __x); - -#if _GLIBCPP_HAVE___BUILTIN_COS - inline double - cos(double __x) { return __builtin_cos(__x); } -#else - extern "C" double cos(double __x); -#endif - - extern "C" double cosh(double __x); - - extern "C" double exp(double __x); - -#if _GLIBCPP_HAVE___BUILTIN_FABS - inline double - fabs(double __x) { return __builtin_fabs(__x); } -#else - extern "C" double fabs(double __x); -#endif - -#if _GLIBCPP_HAVE___BUILTIN_FABS - inline double - abs(double __x) { return __builtin_fabs(__x); } -#else - inline double - abs(double __x) { return fabs(__x); } -#endif - - extern "C" double floor(double __x); - - extern "C" double fmod(double __x, double __y); - - extern "C" double frexp(double __x, int* __exp); - - extern "C" double ldexp(double __x, int __exp); - - extern "C" double log(double __x); - - extern "C" double log10(double __x); - - extern "C" double modf(double __x, double* __iptr); - - extern "C" double pow(double __x, double __y); - - inline double - pow(double __x, int __i) - { - return __pow_helper(__x, __i); - } - -#if _GLIBCPP_HAVE___BUILTIN_SIN - inline double - sin(double __x) { return __builtin_sin(__x); } -#else - extern "C" double sin(double __x); -#endif - - extern "C" double sinh(double __x); - -#if _GLIBCPP_HAVE___BUILTIN_SQRT - inline double - sqrt(double __x) { return __builtin_fsqrt(__x); } -#else - extern "C" double sqrt(double __x); -#endif - - extern "C" double tan(double __x); - - extern "C" double tanh(double __x); - - -#if _GLIBCPP_HAVE___BUILTIN_FABSL - inline long double - abs(long double __x) { return __builtin_fabsl(__x); } -#elif _GLIBCPP_HAVE_FABSL - inline long double - abs(long double __x) { return ::fabsl(__x); } -#else - inline long double - abs(long double __x) { return __cmath_abs(__x); } -#endif - -#if _GLIBCPP_HAVE_ACOSL - inline long double - acos(long double __x) { return ::acosl(__x); } -#else - inline long double - acos(long double __x) { return ::acos(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_ASINL - inline long double - asin(long double __x) { return ::asinl(__x); } -#else - inline long double - asin(long double __x) { return ::asin(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_ATANL - inline long double - atan(long double __x) { return ::atanl(__x); } -#else - inline long double - atan(long double __x) { return ::atan(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_ATAN2L - inline long double - atan2(long double __y, long double __x) { return ::atan2l(__y, __x); } -#else - inline long double - atan2(long double __y, long double __x) - { return ::atan2(static_cast(__y), static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_CEILL - inline long double - ceil(long double __x) { return ::ceill(__x); } -#else - inline long double - ceil(long double __x) { return ::ceil(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE___BUILTIN_COSL - inline long double - cos(long double __x) { return __builtin_cosl(__x); } -#elif _GLIBCPP_HAVE_COSL - inline long double - cos(long double __x) { return ::cosl(__x); } -#else - inline long double - cos(long double __x) { return ::cos(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_COSHL - inline long double - cosh(long double __x) { return ::coshl(__x); } -#else - inline long double - cosh(long double __x) { return ::cosh(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_EXPL - inline long double - exp(long double __x) { return ::expl(__x); } -#else - inline long double - exp(long double __x) { return ::exp(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE___BUILTIN_FABSL - inline long double - fabs(long double __x) { return __builtin_fabsl(__x); } -#elif _GLIBCPP_HAVE_FABSL - inline long double - fabs(long double __x) { return ::fabsl(__x); } -#else - inline long double - fabs(long double __x) { return __cmath_abs(__x); } -#endif - -#if _GLIBCPP_HAVE_FLOORL - inline long double - floor(long double __x) { return ::floorl(__x); } -#else - inline long double - floor(long double __x) { return ::floor(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_FMODL - inline long double - fmod(long double __x, long double __y) { return ::fmodl(__x, __y); } -#else - inline long double - fmod(long double __x, long double __y) - { return ::fmod(static_cast(__x), static_cast(__y)); } -#endif - -#if _GLIBCPP_HAVE_FREXPL - inline long double - frexp(long double __x, int* __exp) { return ::frexpl(__x, __exp); } -#else - inline long double - frexp(long double __x, int* __exp) - { return ::frexp(static_cast(__x), __exp); } -#endif - -#if _GLIBCPP_HAVE_LDEXPL - inline long double - ldexp(long double __x, int __exp) { return ::ldexpl(__x, __exp); } -#else - inline long double - ldexp(long double __x, int __exp) - { return ::ldexp(static_cast(__x), __exp); } -#endif - -#if _GLIBCPP_HAVE_LOGL - inline long double - log(long double __x) { return ::logl(__x); } -#else - inline long double - log(long double __x) { return ::log(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_LOG10L - inline long double - log10(long double __x) { return ::log10l(__x); } -#else - inline long double - log10(long double __x) { return ::log10(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_MODFL - inline long double - modf(long double __x, long double* __iptr) { return ::modfl(__x, __iptr); } -#else - inline long double - modf(long double __x, long double* __iptr) - { - double __tmp; - double __res = ::modf(static_cast(__x), &__tmp); - * __iptr = static_cast(__tmp); - return __res; - } -#endif - -#if _GLIBCPP_HAVE_POWL - inline long double - pow(long double __x, long double __y) { return ::powl(__x, __y); } -#else - inline long double - pow(long double __x, long double __y) - { return ::pow(static_cast(__x), static_cast(__y)); } -#endif - - inline long double - pow(long double __x, int __n) - { - return __pow_helper(__x, __n); - } - -#if _GLIBCPP_HAVE___BUILTIN_SINL - inline long double - sin(long double __x) { return __builtin_sinl(__x); } -#elif _GLIBCPP_HAVE_SINL - inline long double - sin(long double __x) { return ::sinl(__x); } -#else - inline long double - sin(long double __x) { return ::sin(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_SINHL - inline long double - sinh(long double __x) { return ::sinhl(__x); } -#else - inline long double - sinh(long double __x) { return ::sinh(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE___BUILTIN_SQRTL - inline long double - sqrt(long double __x) { return __builtin_sqrtl(__x); } -#elif _GLIBCPP_HAVE_SQRTL - inline long double - sqrt(long double __x) { return ::sqrtl(__x); } -#else - inline long double - sqrt(long double __x) { return ::sqrt(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_TANL - inline long double - tan(long double __x) { return ::tanl(__x); } -#else - inline long double - tan(long double __x) { return ::tan(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_TANHL - inline long double - tanh(long double __x) { return ::tanhl(__x); } -#else - inline long double - tanh(long double __x) { return ::tanh(static_cast(__x)); } -#endif - - -} // std - -#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT -# define export -# include -#endif - #endif diff --git a/libstdc++-v3/include/c/bits/std_csetjmp.h b/libstdc++-v3/include/c/bits/std_csetjmp.h index ea30d8d868d..45e3da5d693 100644 --- a/libstdc++-v3/include/c/bits/std_csetjmp.h +++ b/libstdc++-v3/include/c/bits/std_csetjmp.h @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 2000 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -39,10 +39,4 @@ #pragma GCC system_header #include -namespace std -{ - using ::jmp_buf; - extern "C" void longjmp(jmp_buf, int); -} - #endif diff --git a/libstdc++-v3/include/c/bits/std_csignal.h b/libstdc++-v3/include/c/bits/std_csignal.h index e54db8aa812..da585dd0ae1 100644 --- a/libstdc++-v3/include/c/bits/std_csignal.h +++ b/libstdc++-v3/include/c/bits/std_csignal.h @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 2000 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -39,11 +39,4 @@ #pragma GCC system_header #include -namespace std -{ - using ::sig_atomic_t; - extern "C" void (*signal(int, void (*__func)(int)))(int); - extern "C" int raise(int); -} - #endif diff --git a/libstdc++-v3/include/c/bits/std_cstdarg.h b/libstdc++-v3/include/c/bits/std_cstdarg.h index 817cee5e579..5d2a2d88c54 100644 --- a/libstdc++-v3/include/c/bits/std_cstdarg.h +++ b/libstdc++-v3/include/c/bits/std_cstdarg.h @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 2000 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -39,9 +39,4 @@ #pragma GCC system_header #include -namespace std -{ - using ::va_list; -} - #endif diff --git a/libstdc++-v3/include/c/bits/std_cstddef.h b/libstdc++-v3/include/c/bits/std_cstddef.h index 184a533cfe3..456f6ca9db1 100644 --- a/libstdc++-v3/include/c/bits/std_cstddef.h +++ b/libstdc++-v3/include/c/bits/std_cstddef.h @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 2000 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -39,10 +39,4 @@ #pragma GCC system_header #include -namespace std -{ - using ::ptrdiff_t; - using ::size_t; -} - #endif diff --git a/libstdc++-v3/include/c/bits/std_cstdio.h b/libstdc++-v3/include/c/bits/std_cstdio.h index 62a19aabf2b..b7b29703d1f 100644 --- a/libstdc++-v3/include/c/bits/std_cstdio.h +++ b/libstdc++-v3/include/c/bits/std_cstdio.h @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 2000 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -36,80 +36,7 @@ #ifndef _CPP_CSTDIO #define _CPP_CSTDIO 1 -#include - #pragma GCC system_header #include -// Get rid of those macros defined in in lieu of real functions. -#undef clearerr -#undef feof -#undef ferror -#undef fileno -#undef getc -#undef getchar -#undef putc -#undef putchar - -namespace std -{ - using ::FILE; - using ::fpos_t; - - extern "C" int remove(const char*); - extern "C" int rename(const char*, const char*); - extern "C" FILE* tmpfile(void); - extern "C" char* tmpnam(char*); - extern "C" int fclose(FILE*); - extern "C" int fflush(FILE*); - extern "C" FILE* fopen(const char*, const char*); - extern "C" FILE* freopen(const char*, const char*, FILE*); - extern "C" void setbuf(FILE*, char*); - extern "C" int setvbuf(FILE*, char*, int, size_t); - extern "C" int fprintf(FILE*, const char*, ...); - extern "C" int fscanf(FILE*, const char*, ...); - extern "C" int printf(const char*, ...); - extern "C" int scanf(const char*, ...); - extern "C" int snprintf(char *, size_t, const char*, ...); - extern "C" int sprintf(char *, const char*, ...); - extern "C" int sscanf(const char*, const char*, ...); - extern "C" int vfprintf(FILE*, const char*, va_list); - extern "C" int vfscanf(FILE*, const char*, va_list); - extern "C" int vprintf(const char*, va_list); - extern "C" int vscanf(const char*, va_list); - extern "C" int vsnprintf(char*, size_t, const char*, va_list); - extern "C" int vsprintf(char*, const char*, va_list); - extern "C" int vsscanf(const char*, const char*, va_list); - extern "C" int fgetc(FILE *); - extern "C" char *fgets(char*, int, FILE*); - extern "C" int fputc(int, FILE*); - extern "C" int fputs(const char*, FILE*); - extern "C" int getc(FILE*); - extern "C" int getchar(void); - extern "C" char *gets(char*); - extern "C" int putc(int, FILE*); - extern "C" int putchar(int); - extern "C" int puts(const char*); - extern "C" int ungetc(int, FILE*); - extern "C" size_t fread(void*, size_t, size_t, FILE*); - extern "C" size_t fwrite(const void*, size_t, size_t, FILE*); - extern "C" int fgetpos(FILE*, fpos_t*); - extern "C" int fseek(FILE*, long int, int); - extern "C" int fsetpos(FILE*, const fpos_t*); - extern "C" long int ftell(FILE*); - extern "C" void rewind(FILE*); - extern "C" void clearerr(FILE*); - extern "C" int feof(FILE*); - extern "C" int ferror(FILE*); - extern "C" void perror(const char*); -} - #endif - - - - - - - - diff --git a/libstdc++-v3/include/c/bits/std_cstdlib.h b/libstdc++-v3/include/c/bits/std_cstdlib.h index a43c1c58b90..75402e4aad0 100644 --- a/libstdc++-v3/include/c/bits/std_cstdlib.h +++ b/libstdc++-v3/include/c/bits/std_cstdlib.h @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 2000 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -36,91 +36,7 @@ #ifndef _CPP_CSTDLIB #define _CPP_CSTDLIB 1 -#include - #pragma GCC system_header #include -namespace std -{ - using ::div_t; - using ::ldiv_t; - -#ifdef _GLIBCPP_USE_LONG_LONG -# ifdef _GLIBCPP_HAVE_LLDIV_T - using ::lldiv_t; -# else - struct lldiv_t - { - long long quot; - long long rem; - }; -# endif -#endif - - extern "C" double atof(const char*); - extern "C" int atoi(const char*); - extern "C" long int atol(const char*); - extern "C" double strtod(const char*, char**); - extern "C" float strtof(const char*, char**); - extern "C" long int strtol(const char*, char**, int); - extern "C" unsigned long int strtoul(const char*, char**, int); - extern "C" int rand(void); - extern "C" void srand(unsigned int); - extern "C" void* calloc(size_t, size_t); - extern "C" void free(void*); - extern "C" void* malloc(size_t); - extern "C" void* realloc(void*, size_t); - extern "C" void abort(void); - extern "C" int atexit(void (*func)(void)); - extern "C" void exit(int); - extern "C" void _Exit(int); - extern "C" char*getenv(const char*); - extern "C" int system(const char*); - extern "C" void* bsearch(const void*, const void*, size_t, size_t, - int (*comp)(const void *, const void *)); - extern "C" void qsort(void*, size_t, size_t, - int (*comp)(const void *, const void *)); - extern "C" int abs(int); - extern "C" long int labs(long int); - extern "C" div_t div(int, int); - extern "C" ldiv_t ldiv(long int, long int); - extern "C" int mblen(const char*, size_t); - extern "C" int mbtowc(wchar_t*, const char*, size_t); - extern "C" int wctomb(char*, wchar_t); - extern "C" size_t mbstowcs(wchar_t*, const char*, size_t); - extern "C" size_t wcstombs(char*, const wchar_t*, size_t); - -#ifdef _GLIBCPP_USE_LONG_LONG - inline long long - abs(long long __x) { return __x >= 0 ? __x : -__x; } - - inline long long - llabs(long long __x) { return __x >= 0 ? __x : -__x; } - - inline lldiv_t - div(long long __n, long long __d) - { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } - - inline lldiv_t - lldiv(long long __n, long long __d) - { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } - - extern "C" long long int atoll(const char*); - extern "C" long long int strtoll(const char*, char**, int); - extern "C" unsigned long long int strtoull(const char*, char**, int); -#endif - -#ifdef _GLIBCPP_HAVE_STRTOLD - extern "C" long double strtold(const char*, char**); -#endif -} - #endif - - - - - - - diff --git a/libstdc++-v3/include/c/bits/std_cstring.h b/libstdc++-v3/include/c/bits/std_cstring.h index 581c7a72863..1badbf85c75 100644 --- a/libstdc++-v3/include/c/bits/std_cstring.h +++ b/libstdc++-v3/include/c/bits/std_cstring.h @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 2000 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -41,33 +41,4 @@ #pragma GCC system_header #include -namespace std -{ - extern "C" void* memcpy(void*, const void*, size_t); - extern "C" void* memmove(void*, const void*, size_t); - extern "C" char* strcpy(char*, const char*); - extern "C" char* strncpy(char*, const char*, size_t); - extern "C" char* strcat(char*, const char*); - extern "C" char* strncat(char*, const char*, size_t); - extern "C" int memcmp(const void*, const void*, size_t); - extern "C" int strcmp(const char*, const char*); - extern "C" int strcoll(const char*, const char*); - extern "C" int strncmp(const char*, const char*, size_t); - extern "C" size_t strxfrm(char*, const char*, size_t); - extern "C" void* memchr(const void*, int, size_t); - extern "C" char* strchr(const char*, int); - extern "C" size_t strcspn(const char*, const char*); - extern "C" char* strpbrk(const char*, const char*); - extern "C" char* strrchr(const char*, int); - extern "C" size_t strspn(const char*, const char*); - extern "C" char* strstr(const char*, const char*); - extern "C" char* strtok(char*, const char*); - extern "C" void* memset(void*, int, size_t); - extern "C" char* strerror(int); - extern "C" size_t strlen(const char*); -} - #endif - - - diff --git a/libstdc++-v3/include/c/bits/std_ctime.h b/libstdc++-v3/include/c/bits/std_ctime.h index f340c8e4b92..bf53c50347c 100644 --- a/libstdc++-v3/include/c/bits/std_ctime.h +++ b/libstdc++-v3/include/c/bits/std_ctime.h @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 2000 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -39,21 +39,4 @@ #pragma GCC system_header #include -namespace std -{ - using ::clock_t; - using ::time_t; - using ::tm; - - extern "C" clock_t clock(void); - extern "C" double difftime(time_t, time_t); - extern "C" time_t mktime(struct tm*); - extern "C" time_t time(time_t*); - extern "C" char* asctime(const struct tm*); - extern "C" char* ctime(const time_t*); - extern "C" struct tm* gmtime(const time_t*); - extern "C" struct tm* localtime(const time_t*); - extern "C" size_t strftime(char*, size_t, const char*, const struct tm*); -} - #endif diff --git a/libstdc++-v3/include/c/bits/std_cwchar.h b/libstdc++-v3/include/c/bits/std_cwchar.h index c9ccc86b7c2..713f4445773 100644 --- a/libstdc++-v3/include/c/bits/std_cwchar.h +++ b/libstdc++-v3/include/c/bits/std_cwchar.h @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 2000 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -36,122 +36,7 @@ #ifndef _CPP_CWCHAR #define _CPP_CWCHAR 1 -#include -#include -#include - -#if _GLIBCPP_USE_WCHAR_T #pragma GCC system_header #include -// Get rid of those macros defined in in lieu of real functions. -#undef getwchar - -namespace std -{ - using ::wint_t; - using ::mbstate_t; - - extern "C" wint_t btowc(int); - extern "C" int wctob(wint_t); - extern "C" wint_t fgetwc(FILE*); - extern "C" wchar_t* fgetws(wchar_t*, int, FILE*); - extern "C" wint_t fputwc(wchar_t, FILE*); - extern "C" int fputws(const wchar_t*, FILE*); - extern "C" int fwide(FILE*, int); - extern "C" int fwprintf(FILE*, const wchar_t*, ...); - extern "C" int fwscanf(FILE*, const wchar_t*, ...); - extern "C" int swprintf(wchar_t*, size_t, const wchar_t*, ...); - extern "C" int swscanf(const wchar_t*, const wchar_t*, ...); - extern "C" int vfwprintf(FILE*, const wchar_t*, va_list); - extern "C" int vfwscanf(FILE*, const wchar_t*, va_list); - extern "C" int vswprintf(wchar_t*, size_t, const wchar_t*, va_list); - extern "C" int vswscanf(const wchar_t*, const wchar_t*, va_list); - extern "C" int vwprintf(const wchar_t*, va_list); - extern "C" int vwscanf(const wchar_t*, va_list); - extern "C" int wprintf(const wchar_t*, ...); - extern "C" int wscanf(const wchar_t*, ...); - extern "C" wint_t getwc(FILE* stream); - extern "C" wint_t getwchar(void); - extern "C" int mbsinit(const mbstate_t*); - extern "C" size_t mbrlen(const char*, size_t, mbstate_t*); - extern "C" size_t mbrtowc(wchar_t*, const char*, size_t, mbstate_t*); - extern "C" size_t mbsrtowcs(wchar_t*, const char**, size_t, mbstate_t*); - extern "C" size_t wcsrtombs(char*, const wchar_t **, size_t, mbstate_t*); - extern "C" wint_t putwc(wchar_t, FILE*); - extern "C" wint_t putwchar(wchar_t); - extern "C" wint_t ungetwc(wint_t, FILE*); - extern "C" size_t wcrtomb(char*, wchar_t, mbstate_t*); - extern "C" double wcstod(const wchar_t*, wchar_t**); - extern "C" float wcstof(const wchar_t*, wchar_t**); - extern "C" long int wcstol(const wchar_t*, wchar_t**, int); - extern "C" unsigned long int wcstoul(const wchar_t*, wchar_t**, int); - extern "C" wchar_t* wcscpy(wchar_t* s1, const wchar_t*); - extern "C" wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t); - extern "C" wchar_t* wcscat(wchar_t*, const wchar_t*); - extern "C" wchar_t* wcsncat(wchar_t*, const wchar_t*, size_t); - extern "C" int wcscmp(const wchar_t*, const wchar_t*); - extern "C" int wcscoll(const wchar_t*, const wchar_t*); - extern "C" int wcsncmp(const wchar_t*, const wchar_t*, size_t); - extern "C" size_t wcsxfrm(wchar_t*, const wchar_t*, size_t); - extern "C" wchar_t* wcschr(const wchar_t*, wchar_t); - extern "C" size_t wcscspn(const wchar_t*, const wchar_t*); - extern "C" size_t wcslen(const wchar_t*); - extern "C" wchar_t* wcspbrk(const wchar_t*, const wchar_t*); - extern "C" wchar_t* wcsrchr(const wchar_t*, wchar_t); - extern "C" size_t wcsspn(const wchar_t*, const wchar_t*); - extern "C" wchar_t* wcsstr(const wchar_t*, const wchar_t*); - extern "C" wchar_t* wcstok(wchar_t*, const wchar_t*, wchar_t**); - extern "C" wchar_t* wmemchr(const wchar_t*, wchar_t, size_t); - extern "C" int wmemcmp(const wchar_t*, const wchar_t*, size_t); - //extern "C" int wmemcmp(wchar_t*, const wchar_t*, size_t); - extern "C" wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t); - extern "C" wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t); - extern "C" wchar_t* wmemset(wchar_t*, wchar_t, size_t); - extern "C" size_t wcsftime(wchar_t*, size_t, const wchar_t*, const struct tm*); - -#if 0 - // Full C99 listing - extern "C" long double wcstold(const wchar_t*, wchar_t**); - extern "C" long long int wcstoll(const wchar_t*, wchar_t**, int); - extern "C" unsigned long long int wcstoull(const wchar_t*, wchar_t**, int); -#endif -} - -#else -extern "C" -{ - typedef struct - { - int __fill[6]; - } mbstate_t; -} - -namespace std -{ - using ::mbstate_t; -} -#endif //_GLIBCPP_USE_WCHAR_T - - #endif - - - - - - - - - - - - - - - - - - - - diff --git a/libstdc++-v3/include/c/bits/std_cwctype.h b/libstdc++-v3/include/c/bits/std_cwctype.h index fda9f459402..6f8a7c8f28b 100644 --- a/libstdc++-v3/include/c/bits/std_cwctype.h +++ b/libstdc++-v3/include/c/bits/std_cwctype.h @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 2000 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -39,56 +39,4 @@ #pragma GCC system_header #include -// Get rid of those macros defined in in lieu of real functions. -#undef iswalnum -#undef iswalpha -#undef iswblank -#undef iswcntrl -#undef iswdigit -#undef iswgraph -#undef iswlower -#undef iswprint -#undef iswprint -#undef iswpunct -#undef iswspace -#undef iswupper -#undef iswxdigit -#undef iswctype -#undef towlower -#undef towupper -#undef towctrans -#undef wctrans - -namespace std -{ - using ::wctype_t; - using ::wctrans_t; - - extern "C" int iswalnum(wint_t); - extern "C" int iswalpha(wint_t); - extern "C" int iswblank(wint_t); - extern "C" int iswcntrl(wint_t); - extern "C" int iswdigit(wint_t); - extern "C" int iswgraph(wint_t); - extern "C" int iswlower(wint_t); - extern "C" int iswprint(wint_t); - extern "C" int iswpunct(wint_t); - extern "C" int iswspace(wint_t); - extern "C" int iswupper(wint_t); - extern "C" int iswxdigit(wint_t); - extern "C" int iswctype(wint_t, wctype_t); - extern "C" wctype_t wctype(const char *); - extern "C" wint_t towlower(wint_t); - extern "C" wint_t towupper(wint_t); - extern "C" wint_t towctrans(wint_t, wctrans_t); - extern "C" wctrans_t wctrans(const char*); -} - #endif - - - - - - - diff --git a/libstdc++-v3/include/c_shadow/assert.h b/libstdc++-v3/include/c_shadow/assert.h new file mode 100644 index 00000000000..57e28db743c --- /dev/null +++ b/libstdc++-v3/include/c_shadow/assert.h @@ -0,0 +1,55 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_ASSERT_H_ +# define _INCLUDED_CPP_ASSERT_H_ 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 + +#include + + // 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 /* _INCLUDED_CPP_ASSERT_H_ */ + diff --git a/libstdc++-v3/include/c_shadow/bits/std_cassert.h b/libstdc++-v3/include/c_shadow/bits/std_cassert.h new file mode 100644 index 00000000000..ada1ea16f93 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/std_cassert.h @@ -0,0 +1,61 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 19.2 Assertions +// + +// NB: This is assumed to be a conforming implementation. + +// ISO/IEC 9899:1999 (E), section 7.2 +// assert.h +// ..defines the assert macro... + +// ISO 14882 +// 17.4.1.2 Headers +// ... declarations and definitions (except for macros) are within +// namespace scope of the namepace std... + + +//#ifndef _CPP_CASSERT +//#define _CPP_CASSERT 1 + +//namespace _C_legacy { + extern "C" { +//# define _IN_C_LEGACY_ +# pragma GCC system_header +# include_next + } +//} // namespace _C_legacy + +//#undef _IN_C_LEGACY_ + +//#endif + + diff --git a/libstdc++-v3/include/c_shadow/bits/std_cctype.h b/libstdc++-v3/include/c_shadow/bits/std_cctype.h new file mode 100644 index 00000000000..d164d9c198e --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/std_cctype.h @@ -0,0 +1,145 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// ISO C++ 14882: 22 +// + +#ifndef _CPP_CCTYPE +#define _CPP_CCTYPE 1 + +namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# pragma GCC system_header +# include_next + } + + inline int + _CPP_isalnum_capture(int c) { return isalnum(c); } + + inline int + _CPP_isalpha_capture(int c) { return isalpha(c); } + + inline int + _CPP_iscntrl_capture(int c) { return iscntrl(c); } + + inline int + _CPP_isdigit_capture(int c) { return isdigit(c); } + + inline int + _CPP_isgraph_capture(int c) { return isgraph(c); } + + inline int + _CPP_islower_capture(int c) { return islower(c); } + + inline int + _CPP_isprint_capture(int c) { return isprint(c); } + + inline int + _CPP_ispunct_capture(int c) { return ispunct(c); } + + inline int + _CPP_isspace_capture(int c) { return isspace(c); } + + inline int + _CPP_isupper_capture(int c) { return isupper(c); } + + inline int + _CPP_isxdigit_capture(int c) { return isxdigit(c); } + + inline int + _CPP_tolower_capture(int c) { return tolower(c); } + + inline int + _CPP_toupper_capture(int c) { return toupper(c); } +} // namespace _C_legacy + +# undef isalnum +# undef isalpha +# undef iscntrl +# undef isdigit +# undef isgraph +# undef islower +# undef isprint +# undef ispunct +# undef isspace +# undef isupper +# undef isxdigit + +# undef tolower +# undef toupper + +namespace std { + inline int + isalnum(int __c) { return _C_legacy::_CPP_isalnum_capture(__c); } + + inline int + isalpha(int __c) { return _C_legacy::_CPP_isalpha_capture(__c); } + + inline int + iscntrl(int __c) { return _C_legacy::_CPP_iscntrl_capture(__c); } + + inline int + isdigit(int __c) { return _C_legacy::_CPP_isdigit_capture(__c); } + + inline int + isgraph(int __c) { return _C_legacy::_CPP_isgraph_capture(__c); } + + inline int + islower(int __c) { return _C_legacy::_CPP_islower_capture(__c); } + + inline int + isprint(int __c) { return _C_legacy::_CPP_isprint_capture(__c); } + + inline int + ispunct(int __c) { return _C_legacy::_CPP_ispunct_capture(__c); } + + inline int + isspace(int __c) { return _C_legacy::_CPP_isspace_capture(__c); } + + inline int + isupper(int __c) { return _C_legacy::_CPP_isupper_capture(__c); } + + inline int + isxdigit(int __c) { return _C_legacy::_CPP_isxdigit_capture(__c); } + + inline int + tolower(int __c) { return _C_legacy::_CPP_tolower_capture(__c); } + + inline int + toupper(int __c) { return _C_legacy::_CPP_toupper_capture(__c); } +} // namespace std + +# undef _IN_C_LEGACY_ + +#endif + + + + diff --git a/libstdc++-v3/include/c_shadow/bits/std_cerrno.h b/libstdc++-v3/include/c_shadow/bits/std_cerrno.h new file mode 100644 index 00000000000..0f94a420a8e --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/std_cerrno.h @@ -0,0 +1,48 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// ISO C++ 14882: 19.3 Error numbers +// + +#ifndef _CPP_CERRNO +#define _CPP_CERRNO 1 + +//namespace _C_legacy { + extern "C" { +//# define _IN_C_LEGACY_ +# pragma GCC system_header +# include_next + } +//} // namespace _C_legacy:: + +//# undef _IN_C_LEGACY_ + +#endif + + diff --git a/libstdc++-v3/include/c_shadow/bits/std_cfloat.h b/libstdc++-v3/include/c_shadow/bits/std_cfloat.h new file mode 100644 index 00000000000..d8885e69c44 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/std_cfloat.h @@ -0,0 +1,54 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 18.2.2 Implementation properties: C library +// + +#ifndef _CPP_CFLOAT +#define _CPP_CFLOAT 1 + +namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# pragma GCC system_header +# include_next + } +} // namespace _C_legacy + +# undef _IN_C_LEGACY_ + +#endif + + + + + + + diff --git a/libstdc++-v3/include/c_shadow/bits/std_climits.h b/libstdc++-v3/include/c_shadow/bits/std_climits.h new file mode 100644 index 00000000000..13d30065ab5 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/std_climits.h @@ -0,0 +1,57 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 18.2.2 Implementation properties: C library +// + +#ifndef _CPP_CLIMITS +#define _CPP_CLIMITS 1 + +namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# pragma GCC system_header +# include_next + } +} // namespace _C_legacy + +# undef _IN_C_LEGACY_ + +#endif + + + + + + + + + + diff --git a/libstdc++-v3/include/c_shadow/bits/std_clocale.h b/libstdc++-v3/include/c_shadow/bits/std_clocale.h new file mode 100644 index 00000000000..86d600e262e --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/std_clocale.h @@ -0,0 +1,70 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 18.2.2 Implementation properties: C library +// + +#ifndef _CPP_CLOCALE +#define _CPP_CLOCALE 1 + +# include + +namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# pragma GCC system_header +# include_next + } + + typedef lconv _CPP_lconv_capture; +} // namespace _C_legacy + +# undef lconv +# undef setlocale +# undef localeconv + +namespace std { + // Adopt C names into std:: + struct lconv : _C_legacy::_CPP_lconv_capture { }; + + using _C_legacy::setlocale; + + inline lconv* + localeconv() { return reinterpret_cast(_C_legacy::localeconv()); } +} // namespace std + +# undef _IN_C_LEGACY_ + +#endif + + + + + diff --git a/libstdc++-v3/include/c_shadow/bits/std_cmath.h b/libstdc++-v3/include/c_shadow/bits/std_cmath.h new file mode 100644 index 00000000000..221b8157885 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/std_cmath.h @@ -0,0 +1,833 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 26.5 C library +// + +#ifndef _CPP_CMATH +#define _CPP_CMATH 1 + +# include + +namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# pragma GCC system_header +# include_next + } + +#if _GLIBCPP_HAVE_ACOSF + inline float + _CPP_acos_capture(float __x) { return acosf(__x); } +#else + inline float + _CPP_acos_capture(float __x) { return acos(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_ASINF + inline float + _CPP_asin_capture(float __x) { return asinf(__x); } +#else + inline float + _CPP_asin_capture(float __x) { return asin(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_ATANF + inline float + _CPP_atan_capture(float __x) { return atanf(__x); } +#else + inline float + _CPP_atan_capture(float __x) { return atan(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_ATAN2F + inline float + _CPP_atan2_capture(float __y, float __x) { return atan2f(__y, __x); } +#else + inline float + _CPP_atan2_capture(float __y, float __x) + { return atan2(static_cast(__y), static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_CEILF + inline float + _CPP_ceil_capture(float __x) { return ceilf(__x); } +#else + inline float + _CPP_ceil_capture(float __x) { return ceil(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE___BUILTIN_COSF + inline float + _CPP_cos_capture(float __x) { return __builtin_cosf(__x); } +#elif _GLIBCPP_HAVE_COSF + inline float + _CPP_cos_capture(float __x) { return cosf(__x); } +#else + inline float + _CPP_cos_capture(float __x) { return cos(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_COSHF + inline float + _CPP_cosh_capture(float __x) { return coshf(__x); } +#else + inline float + _CPP_cosh_capture(float __x) { return cosh(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_EXPF + inline float + _CPP_exp_capture(float __x) { return expf(__x); } +#else + inline float + _CPP_exp_capture(float __x) { return exp(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE___BUILTIN_FABSF + inline float + _CPP_fabs_capture(float __x) { return __builtin_fabsf(__x); } +#elif _GLIBCPP_HAVE_FABSF + inline float + _CPP_fabs_capture(float __x) { return fabsf(__x); } +#else + inline float + _CPP_fabs_capture(float __x) { return fabs(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_FLOORF + inline float + _CPP_floor_capture(float __x) { return floorf(__x); } +#else + inline float + _CPP_floor_capture(float __x) { return floor(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_FMODFF + inline float + _CPP_fmod_capture(float __x, float __y) { return fmodf(__x, __y); } +#else + inline float + _CPP_fmod_capture(float __x, float __y) + { return fmod(static_cast(__x), static_cast(__y)); } +#endif + +#if _GLIBCPP_HAVE_FREXPF + inline float + _CPP_frexp_capture(float __x, int* __exp) { return frexpf(__x, __exp); } +#else + inline float + _CPP_frexp_capture(float __x, int* __exp) { return frexp(__x, __exp); } +#endif + +#if _GLIBCPP_HAVE_LDEXPF + inline float + _CPP_ldexp_capture(float __x, int __exp) { return ldexpf(__x, __exp); } +#else + inline float + _CPP_ldexp_capture(float __x, int __exp) + { return ldexp(static_cast(__x), __exp); } +#endif + +#if _GLIBCPP_HAVE_LOGF + inline float + _CPP_log_capture(float __x) { return logf(__x); } +#else + inline float + _CPP_log_capture(float __x) { return log(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_LOG10F + inline float + _CPP_log10_capture(float __x) { return log10f(__x); } +#else + inline float + _CPP_log10_capture(float __x) { return log10(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_MODFF + inline float + _CPP_modf_capture(float __x, float* __iptr) { return modff(__x, __iptr); } +#else + inline float + _CPP_modf_capture(float __x, float* __iptr) + { + double __tmp; + double __res = _C_legacy::modf(static_cast(__x), &__tmp); + *__iptr = static_cast (__tmp); + return __res; + } +#endif + +#if _GLIBCPP_HAVE_POWF + inline float + _CPP_pow_capture(float __x, float __y) { return powf(__x, __y); } +#else + inline float + _CPP_pow_capture(float __x, float __y) + { return pow(static_cast(__x), static_cast(__y)); } +#endif + + float pow(float, int); + +#if _GLIBCPP_HAVE___BUILTIN_SINF + inline float + _CPP_sin_capture(float __x) { return __builtin_sinf(__x); } +#elif _GLIBCPP_HAVE_SINF + inline float + _CPP_sin_capture(float __x) { return sinf(__x); } +#else + inline float + _CPP_sin_capture(float __x) { return sin(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_SINHF + inline float + _CPP_sinh_capture(float __x) { return sinhf(__x); } +#else + inline float + _CPP_sinh_capture(float __x) { return sinh(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE___BUILTIN_SQRTF + inline float + _CPP_sqrt_capture(float __x) { return __builtin_sqrtf(__x); } +#elif _GLIBCPP_HAVE_SQRTF + inline float + _CPP_sqrt_capture(float __x) { return sqrtf(__x); } +#else + inline float + _CPP_sqrt_capture(float __x) { return sqrt(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_TANF + inline float + _CPP_tan_capture(float __x) { return tanf(__x); } +#else + inline float + _CPP_tan_capture(float __x) { return tan(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_TANHF + inline float + _CPP_tanh_capture(float __x) { return tanhf(__x); } +#else + inline float + _CPP_tanh_capture(float __x) { return tanh(static_cast(__x)); } +#endif + + + inline double + _CPP_acos_capture(double __x) { return acos(__x); } + + inline double + _CPP_asin_capture(double __x) { return asin(__x); } + + inline double + _CPP_atan_capture(double __x) { return atan(__x); } + + inline double + _CPP_atan2_capture(double __y, double __x) { return atan2(__y, __x); } + + inline double + _CPP_ceil_capture(double __x) { return ceil(__x); } + +#if _GLIBCPP_HAVE___BUILTIN_COS + inline double + _CPP_cos_capture(double __x) { return __builtin_cos(__x); } +#else + inline double + _CPP_cos_capture(double __x) { return cos(__x); } +#endif + + inline double + _CPP_cosh_capture(double __x) { return cosh(__x); } + + inline double + _CPP_exp_capture(double __x) { return exp(__x); } + +#if _GLIBCPP_HAVE___BUILTIN_FABS + inline double + _CPP_fabs_capture(double __x) { return __builtin_fabs(__x); } +#else + inline double + _CPP_fabs_capture(double __x) { return fabs(__x); } +#endif + + inline double + _CPP_floor_capture(double __x) { return floor(__x); } + + inline double + _CPP_fmod_capture(double __x, double __y) { return fmod(__x, __y); } + + inline double + _CPP_frexp_capture(double __x, int* __exp) { return frexp(__x, __exp); } + + inline double + _CPP_ldexp_capture(double __x, int __exp) { return ldexp(__x, __exp); } + + inline double + _CPP_log_capture(double __x) { return log(__x); } + + inline double + _CPP_log10_capture(double __x) { return log10(__x); } + + inline double + _CPP_modf_capture(double __x, double* __iptr) { return modf(__x, __iptr); } + + inline double + _CPP_pow_capture(double __x, double __y) { return pow(__x, __y); } + +#if _GLIBCPP_HAVE___BUILTIN_SIN + inline double + _CPP_sin_capture(double __x) { return __builtin_sin(__x); } +#else + inline double + _CPP_sin_capture(double __x) { return sin(__x); } +#endif + + inline double + _CPP_sinh_capture(double __x) { return sinh(__x); } + +#if _GLIBCPP_HAVE___BUILTIN_SQRT + inline double + _CPP_sqrt_capture(double __x) { return __builtin_fsqrt(__x); } +#else + inline double + _CPP_sqrt_capture(double __x) { return sqrt(__x); } +#endif + + inline double + _CPP_tan_capture(double __x) { return tan(__x); } + + inline double + _CPP_tanh_capture(double __x) { return tanh(__x); } + +#if _GLIBCPP_HAVE_ACOSL + inline long double + _CPP_acos_capture(long double __x) { return acosl(__x); } +#else + inline long double + _CPP_acos_capture(long double __x) { return acos(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_ASINL + inline long double + _CPP_asin_capture(long double __x) { return asinl(__x); } +#else + inline long double + _CPP_asin_capture(long double __x) { return asin(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_ATANL + inline long double + _CPP_atan_capture(long double __x) { return atanl(__x); } +#else + inline long double + _CPP_atan_capture(long double __x) { return atan(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_ATAN2L + inline long double + _CPP_atan2_capture(long double __y, long double __x) + { return atan2l(__y, __x); } +#else + inline long double + _CPP_atan2_capture(long double __y, long double __x) + { return atan2(static_cast(__y), static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_CEILL + inline long double + _CPP_ceil_capture(long double __x) { return ceill(__x); } +#else + inline long double + _CPP_ceil_capture(long double __x) { return ceil(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE___BUILTIN_COSL + inline long double + _CPP_cos_capture(long double __x) { return __builtin_cosl(__x); } +#elif _GLIBCPP_HAVE_COSL + inline long double + _CPP_cos_capture(long double __x) { return cosl(__x); } +#else + inline long double + _CPP_cos_capture(long double __x) { return cos(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_COSHL + inline long double + _CPP_cosh_capture(long double __x) { return coshl(__x); } +#else + inline long double + _CPP_cosh_capture(long double __x) { return cosh(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_EXPL + inline long double + _CPP_exp_capture(long double __x) { return expl(__x); } +#else + inline long double + _CPP_exp_capture(long double __x) { return exp(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE___BUILTIN_FABSL + inline long double + _CPP_fabs_capture(long double __x) { return __builtin_fabsl(__x); } +#elif _GLIBCPP_HAVE_FABSL + inline long double + _CPP_fabs_capture(long double __x) { return fabsl(__x); } +#else + inline long double + _CPP_fabs_capture(long double __x) { return fabs(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_FLOORL + inline long double + _CPP_floor_capture(long double __x) { return floorl(__x); } +#else + inline long double + _CPP_floor_capture(long double __x) + { return floor(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_FMODL + inline long double + _CPP_fmod_capture(long double __x, long double __y) + { return fmodl(__x, __y); } +#else + inline long double + _CPP_fmod_capture(long double __x, long double __y) + { return fmod(static_cast(__x), static_cast(__y)); } +#endif + +#if _GLIBCPP_HAVE_FREXPL + inline long double + _CPP_frexp_capture(long double __x, int* __exp) + { return frexpl(__x, __exp); } +#else + inline long double + _CPP_frexp_capture(long double __x, int* __exp) + { return frexp(static_cast(__x), __exp); } +#endif + +#if _GLIBCPP_HAVE_LDEXPL + inline long double + _CPP_ldexp_capture(long double __x, int __exp) { return ldexpl(__x, __exp); } +#else + inline long double + _CPP_ldexp_capture(long double __x, int __exp) + { return ldexp(static_cast(__x), __exp); } +#endif + +#if _GLIBCPP_HAVE_LOGL + inline long double + _CPP_log_capture(long double __x) { return logl(__x); } +#else + inline long double + _CPP_log_capture(long double __x) { return log(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_LOG10L + inline long double + _CPP_log10_capture(long double __x) { return log10l(__x); } +#else + inline long double + _CPP_log10_capture(long double __x) + { return log10(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_MODFL + inline long double + _CPP_modf_capture(long double __x, long double* __iptr) + { return modfl(__x, __iptr); } +#else + inline long double + _CPP_modf_capture(long double __x, long double* __iptr) + { + double __tmp; + double __res = _C_legacy::modf(static_cast(__x), &__tmp); + *__iptr = static_cast (__tmp); + return __res; + } +#endif + +#if _GLIBCPP_HAVE_POWL + inline long double + _CPP_pow_capture(long double __x, long double __y) { return powl(__x, __y); } +#else + inline long double + _CPP_pow_capture(long double __x, long double __y) + { return pow(static_cast(__x), static_cast(__y)); } +#endif + +#if _GLIBCPP_HAVE___BUILTIN_SINL + inline long double + _CPP_sin_capture(long double __x) { return __builtin_sinl(__x); } +#elif _GLIBCPP_HAVE_SINL + inline long double + _CPP_sin_capture(long double __x) { return sinl(__x); } +#else + inline long double + _CPP_sin_capture(long double __x) { return sin(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_SINHL + inline long double + _CPP_sinh_capture(long double __x) { return sinhl(__x); } +#else + inline long double + _CPP_sinh_capture(long double __x) { return sinh(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE___BUILTIN_SQRTL + inline long double + _CPP_sqrt_capture(long double __x) { return __builtin_sqrtl(__x); } +#elif _GLIBCPP_HAVE_SQRTL + inline long double + _CPP_sqrt_capture(long double __x) { return sqrtl(__x); } +#else + inline long double + _CPP_sqrt_capture(long double __x) { return sqrt(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_TANL + inline long double + _CPP_tan_capture(long double __x) { return tanl(__x); } +#else + inline long double + _CPP_tan_capture(long double __x) { return tan(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_TANHL + inline long double + _CPP_tanh_capture(long double __x) { return tanhl(__x); } +#else + inline long double + _CPP_tanh_capture(long double __x) { return tanh(static_cast(__x)); } +#endif +} // namespace _C_legacy + +# undef abs +# undef acos +# undef asin +# undef atan +# undef atan2 +# undef ceil +# undef cos +# undef cosh +# undef exp +# undef fabs +# undef floor +# undef fmod +# undef frexp +# undef ldexp +# undef log +# undef log10 +# undef modf +# undef pow +# undef sin +# undef sinh +# undef sqrt +# undef tan +# undef tanh + +namespace std { + inline float + abs(float __x) { return _C_legacy::_CPP_fabs_capture(__x); } + + inline float + acos(float __x) { return _C_legacy::_CPP_acos_capture(__x); } + + inline float + asin(float __x) { return _C_legacy::_CPP_asin_capture(__x); } + + inline float + atan(float __x) { return _C_legacy::_CPP_atan_capture(__x); } + + inline float + atan2(float __y, float __x) + { return _C_legacy::_CPP_atan2_capture(__y, __x); } + + inline float + ceil(float __x) { return _C_legacy::_CPP_ceil_capture(__x); } + + inline float + cos(float __x) { return _C_legacy::_CPP_cos_capture(__x); } + + inline float + cosh(float __x) { return _C_legacy::_CPP_cosh_capture(__x); } + + inline float + exp(float __x) { return _C_legacy::_CPP_exp_capture(__x); } + + inline float + fabs(float __x) { return _C_legacy::_CPP_fabs_capture(__x); } + + inline float + floor(float __x) { return _C_legacy::_CPP_floor_capture(__x); } + + inline float + fmod(float __x, float __y) + { return _C_legacy::_CPP_fmod_capture(__x, __y); } + + inline float + frexp(float __x, int* __exp) + { return _C_legacy::_CPP_frexp_capture(__x, __exp); } + + inline float + ldexp(float __x, int __exp) + { return _C_legacy::_CPP_ldexp_capture(__x, __exp); } + + inline float + log(float __x) { return _C_legacy::_CPP_log_capture(__x); } + + inline float + log10(float __x) { return _C_legacy::_CPP_log10_capture(__x); } + + inline float + modf(float __x, float* __iptr) + { return _C_legacy::_CPP_modf_capture(__x, __iptr); } + + inline float + pow(float __x, float __y) { return _C_legacy::_CPP_pow_capture(__x, __y); } + + float + pow(float, int); + + inline float + sin(float __x) { return _C_legacy::_CPP_sin_capture(__x); } + + inline float + sinh(float __x) { return _C_legacy::_CPP_sinh_capture(__x); } + + inline float + sqrt(float __x) { return _C_legacy::_CPP_sqrt_capture(__x); } + + inline float + tan(float __x) { return _C_legacy::_CPP_tan_capture(__x); } + + inline float + tanh(float __x) { return _C_legacy::_CPP_tanh_capture(__x); } + + inline double + abs(double __x) { return _C_legacy::_CPP_fabs_capture(__x); } + + inline double + acos(double __x) { return _C_legacy::_CPP_acos_capture(__x); } + + inline double + asin(double __x) { return _C_legacy::_CPP_asin_capture(__x); } + + inline double + atan(double __x) { return _C_legacy::_CPP_atan_capture(__x); } + + inline double + atan2(double __y, double __x) + { return _C_legacy::_CPP_atan2_capture(__y, __x); } + + inline double + ceil(double __x) { return _C_legacy::_CPP_ceil_capture(__x); } + + inline double + cos(double __x) { return _C_legacy::_CPP_cos_capture(__x); } + + inline double + cosh(double __x) { return _C_legacy::_CPP_cosh_capture(__x); } + + inline double + exp(double __x) { return _C_legacy::_CPP_exp_capture(__x); } + + inline double + fabs(double __x) { return _C_legacy::_CPP_fabs_capture(__x); } + + inline double + floor(double __x) { return _C_legacy::_CPP_floor_capture(__x); } + + inline double + fmod(double __x, double __y) + { return _C_legacy::_CPP_fmod_capture(__x, __y); } + + inline double + frexp(double __x, int* __exp) + { return _C_legacy::_CPP_frexp_capture(__x, __exp); } + + inline double + ldexp(double __x, int __exp) + { return _C_legacy::_CPP_ldexp_capture(__x, __exp); } + + inline double + log(double __x) { return _C_legacy::_CPP_log_capture(__x); } + + inline double + log10(double __x) { return _C_legacy::_CPP_log10_capture(__x); } + + inline double + modf(double __x, double* __iptr) + { return _C_legacy::_CPP_modf_capture(__x, __iptr); } + + inline double + pow(double __x, double __y) + { return _C_legacy::_CPP_pow_capture(__x, __y); } + + double + pow(double, int); + + inline double + sin(double __x) { return _C_legacy::_CPP_sin_capture(__x); } + + inline double + sinh(double __x) { return _C_legacy::_CPP_sinh_capture(__x); } + + inline double + sqrt(double __x) { return _C_legacy::_CPP_sqrt_capture(__x); } + + inline double + tan(double __x) { return _C_legacy::_CPP_tan_capture(__x); } + + inline double + tanh(double __x) { return _C_legacy::_CPP_tanh_capture(__x); } + + inline long double + abs(long double __x) { return _C_legacy::_CPP_fabs_capture(__x); } + + inline long double + acos(long double __x) { return _C_legacy::_CPP_acos_capture(__x); } + + inline long double + asin(long double __x) { return _C_legacy::_CPP_asin_capture(__x); } + + inline long double + atan(long double __x) { return _C_legacy::_CPP_atan_capture(__x); } + + inline long double + atan2(long double __y, long double __x) + { return _C_legacy::_CPP_atan2_capture(__y, __x); } + + inline long double + ceil(long double __x) { return _C_legacy::_CPP_ceil_capture(__x); } + + inline long double + cos(long double __x) { return _C_legacy::_CPP_cos_capture(__x); } + + inline long double + cosh(long double __x) { return _C_legacy::_CPP_cosh_capture(__x); } + + inline long double + exp(long double __x) { return _C_legacy::_CPP_exp_capture(__x); } + + inline long double + fabs(long double __x) { return _C_legacy::_CPP_fabs_capture(__x); } + + inline long double + floor(long double __x) { return _C_legacy::_CPP_floor_capture(__x); } + + inline long double + fmod(long double __x, long double __y) + { return _C_legacy::_CPP_fmod_capture(__x, __y); } + + inline long double + frexp(long double __x, int* __exp) + { return _C_legacy::_CPP_frexp_capture(__x, __exp); } + + inline long double + ldexp(long double __x, int __exp) + { return _C_legacy::_CPP_ldexp_capture(__x, __exp); } + + inline long double + log(long double __x) { return _C_legacy::_CPP_log_capture(__x); } + + inline long double + log10(long double __x) { return _C_legacy::_CPP_log10_capture(__x); } + + inline long double + modf(long double __x, long double* __iptr) + { return _C_legacy::_CPP_modf_capture(__x, __iptr); } + + inline long double + pow(long double __x, long double __y) + { return _C_legacy::_CPP_pow_capture(__x, __y); } + + long double + pow(long double, int); + + inline long double + sin(long double __x) { return _C_legacy::_CPP_sin_capture(__x); } + + inline long double + sinh(long double __x) { return _C_legacy::_CPP_sinh_capture(__x); } + + inline long double + sqrt(long double __x) { return _C_legacy::_CPP_sqrt_capture(__x); } + + inline long double + tan(long double __x) { return _C_legacy::_CPP_tan_capture(__x); } + + inline long double + tanh(long double __x) { return _C_legacy::_CPP_tanh_capture(__x); } + +} // namespace std + +# undef _IN_C_LEGACY_ + +#endif + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libstdc++-v3/include/c_shadow/bits/std_csetjmp.h b/libstdc++-v3/include/c_shadow/bits/std_csetjmp.h new file mode 100644 index 00000000000..c8f37002329 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/std_csetjmp.h @@ -0,0 +1,63 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 20.4.6 C library +// + +#ifndef _CPP_CSETJMP +#define _CPP_CSETJMP 1 + +namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# pragma GCC system_header +# include_next + } + inline int + _CPP_setjmp_capture(jmp_buf __jb) { return setjmp(__jb); } +} // namespace _C_legacy + +# undef jmp_buf +# undef setjmp +# define setjmp(__jb) _C_legacy::_CPP_setjmp_capture(__jb) +# undef longjmp + +namespace std { + // Adopt C names into std:: + using _C_legacy::jmp_buf; + using _C_legacy::longjmp; +} // namespace std + +# undef _IN_C_LEGACY_ + +#endif + + + diff --git a/libstdc++-v3/include/c_shadow/bits/std_csignal.h b/libstdc++-v3/include/c_shadow/bits/std_csignal.h new file mode 100644 index 00000000000..71f91260214 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/std_csignal.h @@ -0,0 +1,67 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 20.4.6 C library +// + +#ifndef _CPP_CSIGNAL +#define _CPP_CSIGNAL 1 + +namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ + // XXX +# undef __need_sig_atomic_t +# undef __need_sigset_t + +# pragma GCC system_header +# include_next + } +} // namespace _C_legacy + +# undef sig_atomic_t +# undef raise +# undef signal + +namespace std { + // Adopt C names into std:: + using _C_legacy::sig_atomic_t; + using _C_legacy::raise; + using _C_legacy::signal; +} // namespace std + +# undef _IN_C_LEGACY_ + +#endif + + + + + diff --git a/libstdc++-v3/include/c_shadow/bits/std_cstdarg.h b/libstdc++-v3/include/c_shadow/bits/std_cstdarg.h new file mode 100644 index 00000000000..eb1b7909e74 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/std_cstdarg.h @@ -0,0 +1,54 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 20.4.6 C library +// + +#ifndef _CPP_CSTDARG +#define _CPP_CSTDARG 1 + +namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# pragma GCC system_header +# include_next + } +} // namespace _C_legacy + +# undef va_list + +namespace std { + using _C_legacy::va_list; +} // namespace std + +# undef _IN_C_LEGACY_ + +#endif + diff --git a/libstdc++-v3/include/c_shadow/bits/std_cstddef.h b/libstdc++-v3/include/c_shadow/bits/std_cstddef.h new file mode 100644 index 00000000000..588566499b3 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/std_cstddef.h @@ -0,0 +1,59 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 18.1 Types +// + +#ifndef _CPP_CSTDDEF +#define _CPP_CSTDDEF 1 + +namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# pragma GCC system_header +// XXX +# define __need_size_t +# define __need_ptrdiff_t +# define __need_NULL +# include_next + } +} // namespace _C_legacy + +# undef ptrdiff_t +# undef size_t + +namespace std { + using _C_legacy::ptrdiff_t; + using _C_legacy::size_t; +} // namespace std + +# undef _IN_C_LEGACY_ + +#endif diff --git a/libstdc++-v3/include/c_shadow/bits/std_cstdio.h b/libstdc++-v3/include/c_shadow/bits/std_cstdio.h new file mode 100644 index 00000000000..db2761281d0 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/std_cstdio.h @@ -0,0 +1,283 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 27.8.2 C Library files +// + +#ifndef _CPP_CSTDIO +#define _CPP_CSTDIO 1 + +# include +# include + +namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# undef __need_FILE +# pragma GCC system_header +# include_next + } + + typedef FILE _CPP_FILE_capture; + typedef fpos_t _CPP_fpos_t_capture; + + inline FILE* + _CPP_stderr_capture() { return stderr; } + + inline FILE* + _CPP_stdin_capture() { return stdin; } + + inline FILE* + _CPP_stdout_capture() { return stdout; } + + inline int + _CPP_getc_capture(FILE* __f) { return getc(__f); } + + inline int + _CPP_getchar_capture() { return getchar(); } + + inline int + _CPP_putc_capture(int __c, FILE* __f) { return putc(__c, __f); } + + inline int + _CPP_putchar_capture(int __c) { return putchar(__c); } + + inline int + _CPP_feof_capture(FILE* __f) { return feof(__f); } + +} // namespace _C_legacy + +# undef FILE +# undef fpos_t + +# undef remove +# undef rename +# undef tmpfile +# undef tmpnam +# undef fclose +# undef fflush +# undef fopen +# undef freopen +# undef setbuf +# undef setvbuf +# undef fprintf +# undef fscanf +# undef printf +# undef scanf +# undef sprintf +# undef sscanf +# undef vfprintf +# undef vprintf +# undef vsprintf +# undef fgetc +# undef fgets +# undef fputc +# undef fputs +# undef getc +# undef getchar +# undef gets +# undef putc +# undef putchar +# undef puts +# undef ungetc +# undef fread +# undef fwrite +# undef fgetpos +# undef fseek +# undef fsetpos +# undef ftell +# undef rewind +# undef clearerr +# undef feof +# undef ferror +# undef perror + +# undef stderr +# define stderr std::_CPP_stderr() +# undef stdin +# define stdin std::_CPP_stdin() +# undef stdout +# define stdout std::_CPP_stdout() + +namespace std { + struct FILE : _C_legacy::_CPP_FILE_capture { }; + struct fpos_t { _C_legacy::_CPP_fpos_t_capture _M_dummy; }; + + using _C_legacy::remove; + using _C_legacy::rename; + using _C_legacy::tmpnam; + using _C_legacy::printf; + using _C_legacy::scanf; + using _C_legacy::sprintf; + using _C_legacy::sscanf; + using _C_legacy::gets; + using _C_legacy::perror; + + inline FILE* + _CPP_stderr() + { return reinterpret_cast(_C_legacy::_CPP_stderr_capture() ); } + + inline FILE* + _CPP_stdin() + { return reinterpret_cast(_C_legacy::_CPP_stdin_capture() ); } + + inline FILE* + _CPP_stdout() + { return reinterpret_cast(_C_legacy::_CPP_stdout_capture() ); } + + inline FILE* + tmpfile() { return reinterpret_cast(_C_legacy::tmpfile()); } + + inline int + fclose(FILE* __f) { return _C_legacy::fclose(__f); } + + inline int + fflush(FILE* __f) { return _C_legacy::fflush(__f); } + + inline FILE* + fopen(char const* __name, char const* __mode) + { return reinterpret_cast(_C_legacy::fopen(__name,__mode)); } + + inline FILE* + freopen(char const* __name, char const* __mode, FILE* __f) + { return reinterpret_cast(_C_legacy::freopen(__name,__mode,__f)); } + + inline void + setbuf(FILE* __f, char* __buf) + { return _C_legacy::setbuf(__f, __buf); } + + inline int + setvbuf(FILE* __f, char* __buf, int __mode, size_t __size) + { return _C_legacy::setvbuf(__f, __buf, __mode, __size); } + + inline int + fprintf(FILE* __f, char const* __fmt, ...) + { + va_list __v; + va_start(__v,__fmt); + int __i = _C_legacy::vfprintf(__f, __fmt, __v); + va_end(__v); + return __i; + } + + inline int + fscanf(FILE* __f, char const* __fmt, ...) + { + va_list __v; + va_start(__v,__fmt); + int __i = _C_legacy::vfscanf(__f, __fmt, __v); + va_end(__v); + return __i; + } + + inline int + vfprintf(FILE* __f, char const* __fmt, va_list __v) + { return _C_legacy::vfprintf(__f, __fmt, __v); } + + inline int + vprintf(char const* __fmt, va_list __v) + { return _C_legacy::vprintf(__fmt, __v); } + + inline int + vsprintf(char* __buf, char const* __fmt, va_list __v) + { return _C_legacy::vsprintf(__buf, __fmt, __v); } + + inline int + fgetc(FILE* __f) { return _C_legacy::fgetc(__f); } + + inline char* + fgets(char* __buf, int __n, FILE* __f) + { return _C_legacy::fgets(__buf, __n, __f); } + + inline int + fputc(int __c, FILE* __f) { return _C_legacy::fputc(__c, __f); } + + inline int + fputs(char const* __s, FILE* __f) + { return _C_legacy::fputs(__s, __f); } + + inline int + getc(FILE* __f) { return _C_legacy::_CPP_getc_capture(__f); } + + inline int + getchar() { return _C_legacy::_CPP_getchar_capture(); } + + inline int + putc(int __c, FILE* __f) + { return _C_legacy::_CPP_putc_capture(__c, __f); } + + inline int + putchar(int __c) { return _C_legacy::_CPP_putchar_capture(__c); } + + using _C_legacy::puts; + + inline int + ungetc(int __c, FILE* __f) { return _C_legacy::ungetc(__c, __f); } + + inline size_t + fread(void* __p, size_t __z, size_t __n, FILE* __f) + { return _C_legacy::fread(__p,__z,__n,__f); } + + inline size_t + fwrite(void const* __p, size_t __z, size_t __n, FILE* __f) + { return _C_legacy::fwrite(__p,__z,__n,__f); } + + inline int + fgetpos(FILE* __f, fpos_t* __pos) + { return _C_legacy::fgetpos(__f,&__pos->_M_dummy); } + + inline int + fseek(FILE* __f, long __off, int __how) + { return _C_legacy::fseek(__f,__off,__how); } + + inline int + fsetpos(FILE* __f, fpos_t const* __pos) + { return _C_legacy::fsetpos(__f,&__pos->_M_dummy); } + + inline long + ftell(FILE* __f) { return _C_legacy::ftell(__f); } + + inline void + rewind(FILE* __f) { return _C_legacy::rewind(__f); } + + inline void + clearerr(FILE* __f) { return _C_legacy::clearerr(__f); } + + inline int + feof(FILE* __f) { return _C_legacy::_CPP_feof_capture(__f); } + + inline int + ferror(FILE* __f) { return _C_legacy::ferror(__f); } +} // namespace std + +# undef _IN_C_LEGACY_ + +#endif + diff --git a/libstdc++-v3/include/c_shadow/bits/std_cstdlib.h b/libstdc++-v3/include/c_shadow/bits/std_cstdlib.h new file mode 100644 index 00000000000..484182b03d2 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/std_cstdlib.h @@ -0,0 +1,197 @@ +// -*- C++ -*- header wrapper + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 20.4.6 C library +// + +// Function decls in this header are overloaded on the +// extern "C"-ness of arguments. This is a rich ground +// for compiler bugs. + +#ifndef _CPP_CSTDLIB +#define _CPP_CSTDLIB 1 + +# include +# include + +namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# pragma GCC system_header +# include_next + typedef int (*_C_cmp_fun_ptr)(const void*, const void*); // C fn ptr + } + + typedef div_t _CPP_div_t_capture; + typedef ldiv_t _CPP_ldiv_t_capture; + +# if _GLIBCPP_HAVE_LLDIV_T + typedef lldiv_t _CPP_lldiv_t_capture; +# endif +} // namespace _C_legacy + +# undef wchar_t +# undef div_t +# undef ldiv_t + +# undef atof +# undef atoi +# undef atol +# undef strtod +# undef strtol +# undef strtoul +#ifdef _GLIBCPP_HAVE_STRTOLD +# undef strtold +#endif +# undef rand +# undef srand +# undef calloc +# undef free +# undef malloc +# undef realloc +# undef abort +# undef atexit +# undef exit +# undef getenv +# undef system +# undef bsearch +# undef qsort +# undef abs +# undef div +# undef labs +# undef ldiv +#ifdef _GLIBCPP_USE_LONG_LONG +# undef llabs +# undef lldiv +#endif +# undef mblen +# undef mbtowc +# undef wctomb +# undef mbstowcs +# undef wcstombs + +namespace std { + struct div_t : _C_legacy::_CPP_div_t_capture { }; + struct ldiv_t : _C_legacy::_CPP_ldiv_t_capture { }; + +#ifdef _GLIBCPP_USE_LONG_LONG +# ifdef _GLIBCPP_HAVE_LLDIV_T + struct lldiv_t : _C_legacy::_CPP_lldiv_t_captur { }; +# else + struct lldiv_t + { + long long quot; + long long rem; + }; +# endif +#endif + + using _C_legacy::atof; + using _C_legacy::atoi; + using _C_legacy::atol; + using _C_legacy::strtod; + using _C_legacy::strtol; + using _C_legacy::strtoul; + using _C_legacy::rand; + using _C_legacy::srand; + using _C_legacy::calloc; + using _C_legacy::free; + using _C_legacy::malloc; + using _C_legacy::realloc; + + // using _C_legacy::abort; + using _C_legacy::atexit; + // using _C_legacy::exit; + using _C_legacy::bsearch; + using _C_legacy::qsort; + + using _C_legacy::getenv; + using _C_legacy::system; + using _C_legacy::mbtowc; + using _C_legacy::wctomb; + using _C_legacy::mbstowcs; + using _C_legacy::wcstombs; + + using _C_legacy::strtof; + +#ifdef _GLIBCPP_USE_LONG_LONG + using _C_legacy::strtoll; + using _C_legacy::strtoull; +#endif + +#ifdef _GLIBCPP_HAVE_STRTOLD + using _C_legacy::strtold; +#endif + + using _C_legacy::mblen; + + inline int + abs(int __x) { return __x >= 0 ? __x : -__x; } + + inline div_t + div(int __n, int __d) + { div_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } + + inline long + labs(long __x) { return __x >= 0 ? __x : -__x; } + + inline long + abs(long __x) { return __x >= 0 ? __x : -__x; } + + inline ldiv_t + ldiv(long __n, long __d) + { ldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } + + inline ldiv_t + div(long __n, long __d) + { ldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } + +#ifdef _GLIBCPP_USE_LONG_LONG + inline long long + llabs(long long __x) { return __x >= 0 ? __x : -__x; } + + inline long long + abs(long long __x) { return __x >= 0 ? __x : -__x; } + + inline lldiv_t + lldiv(long long __n, long long __d) + { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } + + inline lldiv_t + div(long long __n, long long __d) + { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } +#endif +} // namespace std + +# undef _IN_C_LEGACY_ + +#endif + + diff --git a/libstdc++-v3/include/c_shadow/bits/std_cstring.h b/libstdc++-v3/include/c_shadow/bits/std_cstring.h new file mode 100644 index 00000000000..38b9e6b617d --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/std_cstring.h @@ -0,0 +1,279 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 20.4.6 C library +// + +#ifndef _CPP_CSTRING +#define _CPP_CSTRING 1 + +# if defined __GLIBC__ && __GLIBC__ >= 2 +// We must not see the optimized string functions GNU libc defines. +# define __NO_STRING_INLINES +# endif + +# include + +namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# pragma GCC system_header +# include_next + } + + // We do inline captures of most of these in case they + // have been optimized with macros. + inline void* + _CPP_memcpy_capture(void* __s1, void const* __s2, size_t __n) + { return memcpy(__s1, __s2, __n); } + + inline void* + _CPP_memmove_capture(void* __s1, void const* __s2, size_t __n) + { return memmove(__s1, __s2, __n); } + + inline void* + _CPP_strcpy_capture(char* __s1, char const* __s2) + { return strcpy(__s1, __s2); } + + inline char* + _CPP_strncpy_capture(char* __s1, char const* __s2, size_t __n) + { return strncpy(__s1, __s2, __n); } + + inline char* + _CPP_strcat_capture(char* __s1, char const* __s2) + { return strcat(__s1, __s2); } + + inline char* + _CPP_strncat_capture(char* __s1, char const* __s2, size_t __n) + { return strncat(__s1, __s2, __n); } + + inline int + _CPP_memcmp_capture(void const* __s1, void const* __s2, size_t __n) + { return memcmp(__s1, __s2, __n); } + + inline int + _CPP_strcmp_capture(char const* __s1, char const* __s2) + { return strcmp(__s1, __s2); } + + inline int + _CPP_strcoll_capture(char const* __s1, char const* __s2) + { return strcoll(__s1, __s2); } + + inline int + _CPP_strncmp_capture(char const* __s1, char const* __s2, size_t __n) + { return strncmp(__s1, __s2, __n); } + + inline size_t + _CPP_strxfrm_capture(char* __b, char const* __s, size_t __n) + { return strxfrm(__b, __s, __n); } + + inline void* + _CPP_memchr_capture(void const* __s1, int __c, size_t __n) + { return memchr(__s1, __c, __n); } + + inline char* + _CPP_strchr_capture(char const* __s1, int __c) + { return strchr(__s1, __c); } + + inline size_t + _CPP_strcspn_capture(char const* __s1, char const* __s2) + { return strcspn(__s1, __s2); } + + inline char* + _CPP_strpbrk_capture(char const* __s1, char const* __s2) + { return strpbrk(__s1, __s2); } + + inline char* + _CPP_strrchr_capture(char const* __s1, int __c) + { return strrchr(__s1, __c); } + + inline size_t + _CPP_strspn_capture(char const* __s1, char const* __s2) + { return strspn(__s1, __s2); } + + inline char* + _CPP_strstr_capture(char const* __s1, char const* __s2) + { return strstr(__s1, __s2); } + + inline char* + _CPP_strtok_capture(char* __s1, char const* __s2) + { return strtok(__s1, __s2); } + + inline void* + _CPP_memset_capture(void* __s, int __c, size_t __n) + { return memset(__s, __c, __n); } + + // inline char* + // _CPP_strerror_capture(int __num) + // { return strerror(__num); } + + inline size_t + _CPP_strlen_capture(char const* __s) + { return strlen(__s); } +} // namespace _C_legacy + +# undef memcpy +# undef memmove +# undef strcpy +# undef strncpy +# undef strcat +# undef strncat +# undef memcmp +# undef strcmp +# undef strcoll +# undef strncmp +# undef strxfrm +# undef memchr +# undef strchr +# undef strcspn +# undef strpbrk +# undef strrchr +# undef strspn +# undef strstr +# undef strtok +# undef memset +# undef strerror +# undef strlen + +namespace std { + // Redefine most of these inline. Note that the + // C++ definition differs from C in some cases. + inline void* + memcpy(void* __s1, void const* __s2, size_t __n) + { return _C_legacy::_CPP_memcpy_capture(__s1, __s2, __n); } + + inline void* + memmove(void* __s1, void const* __s2, size_t __n) + { return _C_legacy::_CPP_memmove_capture(__s1, __s2, __n); } + + inline void* + strcpy(char* __s1, char const* __s2) + { return _C_legacy::_CPP_strcpy_capture(__s1, __s2); } + + inline char* + strncpy(char* __s1, char const* __s2, size_t __n) + { return _C_legacy::_CPP_strncpy_capture(__s1, __s2, __n); } + + inline char* + strcat(char* __s1, char const* __s2) + { return _C_legacy::_CPP_strcat_capture(__s1, __s2); } + + inline char* + strncat(char* __s1, char const* __s2, size_t __n) + { return _C_legacy::_CPP_strncat_capture(__s1, __s2, __n); } + + inline int + memcmp(void const* __s1, void const* __s2, size_t __n) + { return _C_legacy::_CPP_memcmp_capture(__s1, __s2, __n); } + + inline int + strcmp(char const* __s1, char const* __s2) + { return _C_legacy::_CPP_strcmp_capture(__s1, __s2); } + + inline int + strcoll(char const* __s1, char const* __s2) + { return _C_legacy::_CPP_strcoll_capture(__s1, __s2); } + + inline int + strncmp(char const* __s1, char const* __s2, size_t __n) + { return _C_legacy::_CPP_strncmp_capture(__s1, __s2, __n); } + + inline size_t + strxfrm(char* __b, char const* __s, size_t __n) + { return _C_legacy::_CPP_strxfrm_capture(__b, __s, __n); } + + inline void + const* memchr(void const* __s1, int __c, size_t __n) + { return _C_legacy::_CPP_memchr_capture(__s1, __c, __n); } + + inline void* + memchr(void* __s1, int __c, size_t __n) + { return _C_legacy::_CPP_memchr_capture(__s1, __c, __n); } + + inline char const* + strchr(char const* __s1, int __c) + { return _C_legacy::_CPP_strchr_capture(__s1, __c); } + + inline char* + strchr(char* __s1, int __c) + { return _C_legacy::_CPP_strchr_capture(__s1, __c); } + + inline size_t + strcspn(char const* __s1, char const* __s2) + { return _C_legacy::_CPP_strcspn_capture(__s1, __s2); } + + inline char const* + strpbrk(char const* __s1, char const* __s2) + { return _C_legacy::_CPP_strpbrk_capture(__s1, __s2); } + + inline char* + strpbrk(char* __s1, char const* __s2) + { return _C_legacy::_CPP_strpbrk_capture(__s1, __s2); } + + inline char const* + strrchr(char const* __s1, int __c) + { return _C_legacy::_CPP_strrchr_capture(__s1, __c); } + + inline char* + strrchr(char* __s1, int __c) + { return _C_legacy::_CPP_strrchr_capture(__s1, __c); } + + inline size_t + strspn(char const* __s1, char const* __s2) + { return _C_legacy::_CPP_strspn_capture(__s1, __s2); } + + inline char const* + strstr(char const* __s1, char const* __s2) + { return _C_legacy::_CPP_strstr_capture(__s1, __s2); } + + inline char* + strstr(char* __s1, char const* __s2) + { return _C_legacy::_CPP_strstr_capture(__s1, __s2); } + + inline char* + strtok(char* __s1, char const* __s2) + { return _C_legacy::_CPP_strtok_capture(__s1, __s2); } + + inline void* + memset(void* __s, int __c, size_t __n) + { return _C_legacy::_CPP_memset_capture(__s, __c, __n); } + + using _C_legacy::strerror; + + inline size_t + strlen(char const* __s) + { return _C_legacy::_CPP_strlen_capture(__s); } + +} // namespace std + +# undef _IN_C_LEGACY_ + +#endif + diff --git a/libstdc++-v3/include/c_shadow/bits/std_ctime.h b/libstdc++-v3/include/c_shadow/bits/std_ctime.h new file mode 100644 index 00000000000..44709f0238f --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/std_ctime.h @@ -0,0 +1,107 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 20.5 Date and time +// + +#ifndef _CPP_CTIME +#define _CPP_CTIME 1 + +# include + +namespace _C_legacy { + extern "C" { +# 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 + +# include_next + } + + typedef clock_t _CPP_clock_t_capture; + typedef time_t _CPP_time_t_capture; + typedef tm _CPP_tm_capture; + +} // namespace _C_legacy + +# undef clock_t +# undef time_t +# undef tm +# undef clock +# undef difftime +# undef mktime +# undef time +# undef asctime +# undef ctime +# undef gmtime +# undef localtime +# undef strftime + +namespace std { + + // Adopt C names into std:: + typedef _C_legacy::_CPP_clock_t_capture clock_t; + typedef _C_legacy::_CPP_time_t_capture time_t; + struct tm : _C_legacy::_CPP_tm_capture { }; + + using _C_legacy::clock; + using _C_legacy::difftime; + using _C_legacy::mktime; + using _C_legacy::time; + using _C_legacy::ctime; + + inline char* + asctime(const tm* __t) + { return _C_legacy::asctime(static_cast<_C_legacy::_CPP_tm_capture const*>(__t)); } + + inline tm* + gmtime(time_t const* __tp) + { return reinterpret_cast(_C_legacy::gmtime(__tp)); } + + inline tm* + localtime(const time_t* __tp) + { return reinterpret_cast(_C_legacy::localtime(__tp)); } + + inline size_t + strftime(char* __buf, size_t __maxsz, char const* __fmt, tm const* __tp) + { return _C_legacy::strftime(__buf, __maxsz, __fmt, + static_cast<_C_legacy::_CPP_tm_capture const*>(__tp)); } + +} // namespace std + +# undef _IN_C_LEGACY_ + +#endif + diff --git a/libstdc++-v3/include/c_shadow/bits/std_cwchar.h b/libstdc++-v3/include/c_shadow/bits/std_cwchar.h new file mode 100644 index 00000000000..db659f469f2 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/std_cwchar.h @@ -0,0 +1,275 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 21 + +#ifndef _CPP_CWCHAR +# define _CPP_CWCHAR 1 +# include + +namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# pragma GCC system_header +# include_next + } + +#if 0 + // XXX + inline int + fwprintf(FILE* __stream, const wchar_t* __format, ...); + + inline int + fwscanf(FILE* __stream, const wchar_t* __format, ...); + + inline int + vfwprintf(FILE* __stream, const wchar_t* __format, va_list __arg); + + inline int + vfwscanf(FILE* __stream, const wchar_t* __format, va_list __arg); + + inline wint_t + _CPP_fgetwc_capture(FILE* __stream) + { return fgetwc(__stream); } + + inline wchar_t* + _CPP_fgetws_capture(wchar_t* __s, int __n, FILE* __stream) + { return fgetws(__s, __n, __stream); } + + inline wint_t + _CPP_fputwc_capture(wchar_t __c, FILE* __stream) + { return fputwc(__c, __stream); } + + inline int + _CPP_fputws_capture(const wchar_t* __s, FILE* __stream) + { return fputws(__s, __stream); } + + inline int + _CPP_fwide_capture(FILE* __stream, int __mode) + { return fwide(__stream, __mode); } + + inline wint_t + _CPP_fgetwc_capture(FILE* __stream) + { return fgetwc(__stream); } + + inline wint_t + _CPP_putwc_capture(wchar_t __c, FILE* __stream) + { return putwc(__c, __stream); } + + inline wint_t + _CPP_ungetwc_capture(wint_t __c, FILE* __stream) + { return ungetwc(__c, __stream); } +#endif +} // namespace _C_legacy + +# undef wchar_t +# undef wint_t +# undef mbstate_t + +# undef fwprintf +# undef fwscanf +# undef swprintf +# undef swscanf +# undef vfwprintf +# undef vfwscanf +# undef vswprintf +# undef vswscanf +# undef vwprintf +# undef vwscanf +# undef wprintf +# undef wscanf +# undef fgetwc +# undef fgetws +# undef fputwc +# undef fputws +# undef fwide +# undef getwc +# undef getwchar +# undef putwc +# undef putwchar +# undef ungetwc +# undef wcstod +# undef wcstof +# undef wcstold +# undef wcstol +# undef wcstoll +# undef wcstoul +# undef wcstoull +# undef wcscpy +# undef wcsncpy +# undef wcscat +# undef wcsncat +# undef wcsmp +# undef wcscoll +# undef wcsncmp +# undef wcsxfrm +# undef wcschr +# undef wcscspn +# undef wcslen +# undef wcspbrk +# undef wcsrchr +# undef wcsspn +# undef wcsstr +# undef wcstok +# undef wmemchr +# undef wmemcmp +# undef wmemcpy +# undef wmemmove +# undef wmemset +# undef wcsftime +# undef btowc +# undef wctob +# undef mbsinit +# undef mbrlen +# undef mbrtowc +# undef wcrtomb +# undef mbsrtowcs +# undef wcsrtombs + +namespace std { + + using _C_legacy::wint_t; + using _C_legacy::mbstate_t; + +#if 0 + using _C_legacy::swprintf; + using _C_legacy::swscanf; + using _C_legacy::vswprintf; + using _C_legacy::vswscanf; + using _C_legacy::vwprintf; + using _C_legacy::vwscanf; + using _C_legacy::wprintf; + using _C_legacy::wscanf; + using _C_legacy::getwchar; + using _C_legacy::putwchar; +#endif + + using _C_legacy::wcstod; + using _C_legacy::wcstof; + using _C_legacy::wcstold; + using _C_legacy::wcstol; + using _C_legacy::wcstoll; + using _C_legacy::wcstoul; + using _C_legacy::wcstoull; + using _C_legacy::wcscpy; + using _C_legacy::wcsncpy; + using _C_legacy::wcscat; + using _C_legacy::wcsncat; + +#if 0 + using _C_legacy::wcsmp; +#endif + + using _C_legacy::wcscoll; + using _C_legacy::wcsncmp; + using _C_legacy::wcsxfrm; + using _C_legacy::wcschr; + using _C_legacy::wcscspn; + using _C_legacy::wcslen; + using _C_legacy::wcspbrk; + using _C_legacy::wcsrchr; + using _C_legacy::wcsspn; + using _C_legacy::wcsstr; + using _C_legacy::wcstok; + using _C_legacy::wmemchr; + using _C_legacy::wmemcmp; + using _C_legacy::wmemcpy; + using _C_legacy::wmemmove; + using _C_legacy::wmemset; + +#if 0 + using _C_legacy::wcsftime; +#endif + + using _C_legacy::btowc; + using _C_legacy::wctob; + using _C_legacy::mbsinit; + using _C_legacy::mbrlen; + using _C_legacy::mbrtowc; + using _C_legacy::wcrtomb; + using _C_legacy::mbsrtowcs; + using _C_legacy::wcsrtombs; + +#if 0 + // XXX + inline int + fwprintf(FILE* __stream, const wchar_t* __format, ...); + + inline int + fwscanf(FILE* __stream, const wchar_t* __format, ...); + + inline int + vfwprintf(FILE* __stream, const wchar_t* __format, va_list __arg); + + inline int + vfwscanf(FILE* __stream, const wchar_t* __format, va_list __arg); + + inline wint_t + fgetwc(FILE* __stream) + { return _C_legacy::_CPP_fgetwc_capture(__stream); } + + inline wchar_t* + fgetws(wchar_t* __s, int __n, FILE* __stream) + { return _C_legacy::_CPP_fgetws_capture(__s, __n, __stream); } + + inline wint_t + fputwc(wchar_t __c, FILE* __stream) + { return _C_legacy::_CPP_fputwc_capture(__c, __stream); } + + inline int + fputws(const wchar_t* __s, FILE* __stream) + { return _C_legacy::_CPP_fputws_capture(__s, __stream); } + + inline int + fwide(FILE* __stream, int __mode) + { return _C_legacy::_CPP_fwide_capture(__stream, __mode); } + + inline wint_t + getwc(FILE* __stream) + { return _C_legacy::_CPP_getwc_capture(__stream); } + + inline wint_t + putwc(wchar_t __c, FILE* __stream) + { return _C_legacy::_CPP_putwc_capture(__c, __stream); } + + inline wint_t + ungetwc(wint_t __c, FILE* __stream) + { return _C_legacy::_CPP_ungetwc_capture(__c, __stream); } +#endif +} + +# undef _IN_C_LEGACY_ + +#endif + + + + + diff --git a/libstdc++-v3/include/c_shadow/bits/std_cwctype.h b/libstdc++-v3/include/c_shadow/bits/std_cwctype.h new file mode 100644 index 00000000000..1a6a64282fd --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/std_cwctype.h @@ -0,0 +1,129 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: +// + +#ifndef _CPP_CWCTYPE +#define _CPP_CWCTYPE 1 + +# include + +namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# pragma GCC system_header +# include_next + } +} // namespace _C_legacy + + +# undef wctype_t +# undef wctrans_t +# undef iswalpha +# undef iswupper +# undef iswlower +# undef iswdigit +# undef iswxdigit +# undef iswalnum +# undef iswspace +# undef iswpunct +# undef iswprint +# undef iswgraph +# undef iswcntrl +# undef iswctype +# undef towctrans +# undef towlower +# undef towupper +# undef wctrans +# undef wctype + +namespace std { + using _C_legacy::wctype_t; + using _C_legacy::wctrans_t; + + inline int + iswalpha(wint_t __wc) { return _C_legacy::iswalpha(__wc); } + + inline int + iswupper(wint_t __wc) { return _C_legacy::iswupper(__wc); } + + inline int + iswlower(wint_t __wc) { return _C_legacy::iswlower(__wc); } + + inline int + iswdigit(wint_t __wc) { return _C_legacy::iswdigit(__wc); } + + inline int + iswxdigit(wint_t __wc) { return _C_legacy::iswxdigit(__wc); } + + inline int + iswalnum(wint_t __wc) { return _C_legacy::iswalnum(__wc); } + + inline int + iswspace(wint_t __wc) { return _C_legacy::iswspace(__wc); } + + inline int + iswpunct(wint_t __wc) { return _C_legacy::iswpunct(__wc); } + + inline int + iswprint(wint_t __wc) { return _C_legacy::iswprint(__wc); } + + inline int + iswgraph(wint_t __wc) { return _C_legacy::iswgraph(__wc); } + + inline int + iswcntrl(wint_t __wc) { return _C_legacy::iswcntrl(__wc); } + + inline int + towlower(wint_t __wc) { return _C_legacy::towlower(__wc); } + + inline int + towupper(wint_t __wc) { return _C_legacy::towupper(__wc); } + + inline int + iswctype(wint_t __wc, wctype_t __desc) + { return _C_legacy::iswctype(__wc, __desc); } + + inline wint_t + towctrans(wint_t __wc, wctrans_t __desc) + { return _C_legacy::towctrans (__wc, __desc); } + + inline wctrans_t + wctrans(const char *__property) { return _C_legacy::wctrans(__property); } + + inline wctype_t + wctype(char const* __property) { return _C_legacy::wctype(__property); } +} // namespace std + +# undef _IN_C_LEGACY_ + +#endif + diff --git a/libstdc++-v3/include/c_shadow/bits/wrap_fcntl.h b/libstdc++-v3/include/c_shadow/bits/wrap_fcntl.h new file mode 100644 index 00000000000..0bed4bf1d4a --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/wrap_fcntl.h @@ -0,0 +1,92 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 26.5 C library extensions +// + +#ifndef _CPP_FCNTL +#define _CPP_FCNTL 1 + +# include + +namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# pragma GCC system_header + // XXX +# undef SEEK_SET +# undef SEEK_CUR +# undef SEEK_END + +# include_next + } +} // namespace _C_legacy + +# undef SEEK_SET +# undef SEEK_CUR +# undef SEEK_END + +// NB: Don't bring elements from this non-standard header into namespace std. + +# undef _IN_C_LEGACY_ + +#endif + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libstdc++-v3/include/c_shadow/bits/wrap_features.h b/libstdc++-v3/include/c_shadow/bits/wrap_features.h new file mode 100644 index 00000000000..52402bf66bb --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/wrap_features.h @@ -0,0 +1,51 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 20.5 Extensions +// + +#ifndef _CPP_WRAP_FEATURES_H +#define _CPP_WRAP_FEATURES_H 1 + +#include + +namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# pragma GCC system_header +# include_next + } +} // namespace _C_legacy + +// NB: Don't bring elements from this non-standard header into namespace std. + +# undef _IN_C_LEGACY_ + +#endif diff --git a/libstdc++-v3/include/c_shadow/bits/wrap_iconv.h b/libstdc++-v3/include/c_shadow/bits/wrap_iconv.h new file mode 100644 index 00000000000..3e72e2d46ee --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/wrap_iconv.h @@ -0,0 +1,51 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 20.5 Extensions +// + +#ifndef _CPP_WRAP_ICONV_H +#define _CPP_WRAP_ICONV_H 1 + +namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# pragma GCC system_header +# include_next + } +} // namespace _C_legacy + +// NB: Don't bring elements from this non-standard header into namespace std. + +# undef _IN_C_LEGACY_ + +#endif + + diff --git a/libstdc++-v3/include/c_shadow/bits/wrap_iolibio.h b/libstdc++-v3/include/c_shadow/bits/wrap_iolibio.h new file mode 100644 index 00000000000..ddbabd7a424 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/wrap_iolibio.h @@ -0,0 +1,50 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 20.5 Extensions +// + +#ifndef _CPP_WRAP_IOLIBIO_H +#define _CPP_WRAP_IOLIBIO_H 1 + +namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# pragma GCC system_header +# include_next + } +} // namespace _C_legacy + +// NB: Don't bring elements from this non-standard header into namespace std. + +# undef _IN_C_LEGACY_ + +#endif + diff --git a/libstdc++-v3/include/c_shadow/bits/wrap_langinfo.h b/libstdc++-v3/include/c_shadow/bits/wrap_langinfo.h new file mode 100644 index 00000000000..138faa10d77 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/wrap_langinfo.h @@ -0,0 +1,49 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 20.5 Extensions +// + +#ifndef _CPP_WRAP_LANGINFO_H +#define _CPP_WRAP_LANGINFO_H 1 + +namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# pragma GCC system_header +# include_next + } +} // namespace _C_legacy + +# undef _IN_C_LEGACY_ + +#endif + + diff --git a/libstdc++-v3/include/c_shadow/bits/wrap_libio.h b/libstdc++-v3/include/c_shadow/bits/wrap_libio.h new file mode 100644 index 00000000000..e5da6e3f382 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/wrap_libio.h @@ -0,0 +1,50 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 20.5 Extensions +// + +#ifndef _CPP_WRAP_LIBIO_H +#define _CPP_WRAP_LIBIO_H 1 + +namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# pragma GCC system_header +# include_next + } +} // namespace _C_legacy + +// NB: Don't bring elements from this non-standard header into namespace std. + +# undef _IN_C_LEGACY_ + +#endif + diff --git a/libstdc++-v3/include/c_shadow/bits/wrap_libioP.h b/libstdc++-v3/include/c_shadow/bits/wrap_libioP.h new file mode 100644 index 00000000000..32f8c2ebd10 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/wrap_libioP.h @@ -0,0 +1,50 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 20.5 Extensions +// + +#ifndef _CPP_WRAP_LIBIOP_H +#define _CPP_WRAP_LIBIOP_H 1 + +namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# pragma GCC system_header +# include_next + } +} // namespace _C_legacy + +// NB: Don't bring elements from this non-standard header into namespace std. + +# undef _IN_C_LEGACY_ + +#endif + diff --git a/libstdc++-v3/include/c_shadow/bits/wrap_pthread.h b/libstdc++-v3/include/c_shadow/bits/wrap_pthread.h new file mode 100644 index 00000000000..d04eeba8a31 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/wrap_pthread.h @@ -0,0 +1,81 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 26.5 C library extensions +// + +#ifndef _CPP_WRAP_PTHREAD_H +#define _CPP_WRAP_PTHREAD_H 1 + +# include + +namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# pragma GCC system_header +# include_next + } +} // namespace _C_legacy + +# undef _IN_C_LEGACY_ + +#endif + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libstdc++-v3/include/c_shadow/bits/wrap_unistd.h b/libstdc++-v3/include/c_shadow/bits/wrap_unistd.h new file mode 100644 index 00000000000..8e28b698c72 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/bits/wrap_unistd.h @@ -0,0 +1,47 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// +// ISO C++ 14882: 26.5 C library extensions +// + +#ifndef _CPP_WRAP_UNISTD_H +#define _CPP_WRAP_UNISTD_H 1 + +namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# pragma GCC system_header +# include_next + } +} // namespace _C_legacy + +# undef _IN_C_LEGACY_ + +#endif diff --git a/libstdc++-v3/include/c_shadow/ctype.h b/libstdc++-v3/include/c_shadow/ctype.h new file mode 100644 index 00000000000..199089c594c --- /dev/null +++ b/libstdc++-v3/include/c_shadow/ctype.h @@ -0,0 +1,67 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_CTYPE_H_ +# define _INCLUDED_CPP_CTYPE_H_ 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 + +# include + + // 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; + +# 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 /* _INCLUDED_CPP_CTYPE_H_ */ diff --git a/libstdc++-v3/include/c_shadow/errno.h b/libstdc++-v3/include/c_shadow/errno.h new file mode 100644 index 00000000000..4e2fc332e88 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/errno.h @@ -0,0 +1,56 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_ERRNO_H_ +# define _INCLUDED_CPP_ERRNO_H_ 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 + +# include + + // 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 /* _INCLUDED_CPP_ERRNO_H_ */ + diff --git a/libstdc++-v3/include/c_shadow/fcntl.h b/libstdc++-v3/include/c_shadow/fcntl.h new file mode 100644 index 00000000000..f19a1549274 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/fcntl.h @@ -0,0 +1,63 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_FCNTL_H_ +# define _INCLUDED_CPP_FCNTL_H_ 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 _FCNTL_NEED_C_LEGACY_ +# endif + +# include + + // Expose global C names, including non-standard ones, but shadow + // some names and types with the std:: C++ version. + using _C_legacy::flock; + + using _C_legacy::creat; + using _C_legacy::open; + using _C_legacy::fcntl; + +# ifdef _FCNTL_NEED_C_LEGACY_ + // dive back into the "swamp" + namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# undef _FCNTL_NEED_C_LEGACY_ +# endif /* _FCNTL_NEED_C_LEGACY_ */ +#endif /* _INCLUDED_CPP_FCNTL_H_ */ + + + + diff --git a/libstdc++-v3/include/c_shadow/features.h b/libstdc++-v3/include/c_shadow/features.h new file mode 100644 index 00000000000..eed4b0e803d --- /dev/null +++ b/libstdc++-v3/include/c_shadow/features.h @@ -0,0 +1,58 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_FEATURES_H_ +# define _INCLUDED_CPP_FEATURES_H_ 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 _FEATURES_NEED_C_LEGACY_ +# endif + +# include + + // Expose global C names, including non-standard ones, but shadow + // some names and types with the std:: C++ version. + +# ifdef _FEATURES_NEED_C_LEGACY_ + // dive back into the "swamp" + namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# undef _FEATURES_NEED_C_LEGACY_ +# endif /* _FEATURES_NEED_C_LEGACY_ */ +#endif /* _INCLUDED_CPP_FEATURES_H_ */ + + + + diff --git a/libstdc++-v3/include/c_shadow/float.h b/libstdc++-v3/include/c_shadow/float.h new file mode 100644 index 00000000000..f52c5f5c9eb --- /dev/null +++ b/libstdc++-v3/include/c_shadow/float.h @@ -0,0 +1,54 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_FLOAT_H_ +# define _INCLUDED_CPP_FLOAT_H_ 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 + +# include + + // 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 /* _INCLUDED_CPP_FLOAT_H_ */ diff --git a/libstdc++-v3/include/c_shadow/iconv.h b/libstdc++-v3/include/c_shadow/iconv.h new file mode 100644 index 00000000000..1ea5038c24a --- /dev/null +++ b/libstdc++-v3/include/c_shadow/iconv.h @@ -0,0 +1,66 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_ICONV_H_ +# define _INCLUDED_CPP_ICONV_H_ 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 _ICONV_NEED_C_LEGACY_ +# endif + +# include + + // Expose global C names, including non-standard ones, but shadow + // some names and types with the std:: C++ version. + + // NB: Cannot use typedefs here to inject the names as the "C" headers + // often include typedefs that include the keyword 'struct' + using _C_legacy::iconv_t; + + using _C_legacy::iconv_open; + using _C_legacy::iconv; + using _C_legacy::iconv_close; + +# ifdef _ICONV_NEED_C_LEGACY_ + // dive back into the "swamp" + namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# undef _ICONV_NEED_C_LEGACY_ +# endif /* _ICONV_NEED_C_LEGACY_ */ +#endif /* _INCLUDED_CPP_ICONV_H_ */ + + + + diff --git a/libstdc++-v3/include/c_shadow/iolibio.h b/libstdc++-v3/include/c_shadow/iolibio.h new file mode 100644 index 00000000000..845f6403594 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/iolibio.h @@ -0,0 +1,58 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_IOLIBIO_H_ +# define _INCLUDED_CPP_IOLIBIO_H_ 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 _IOLIBIO_NEED_C_LEGACY_ +# endif + +# include + + // Expose global C names, including non-standard ones, but shadow + // some names and types with the std:: C++ version. + +# ifdef _IOLIBIO_NEED_C_LEGACY_ + // dive back into the "swamp" + namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# undef _IOLIBIO_NEED_C_LEGACY_ +# endif /* _IOLIBIO_NEED_C_LEGACY_ */ +#endif /* _INCLUDED_CPP_IOLIBIO_H_ */ + + + + diff --git a/libstdc++-v3/include/c_shadow/langinfo.h b/libstdc++-v3/include/c_shadow/langinfo.h new file mode 100644 index 00000000000..3333ef15c81 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/langinfo.h @@ -0,0 +1,55 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_LANGINFO_H_ +# define _INCLUDED_CPP_LANGINFO_H_ 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 _LANGINFO_NEED_C_LEGACY_ +# endif + +# include + +# ifdef _LANGINFO_NEED_C_LEGACY_ + // dive back into the "swamp" + namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# undef _LANGINFO_NEED_C_LEGACY_ +# endif /* _LANGINFO_NEED_C_LEGACY_ */ +#endif /* _INCLUDED_CPP_LANGINFO_H_ */ + + + + diff --git a/libstdc++-v3/include/c_shadow/libio.h b/libstdc++-v3/include/c_shadow/libio.h new file mode 100644 index 00000000000..2cafc7d88eb --- /dev/null +++ b/libstdc++-v3/include/c_shadow/libio.h @@ -0,0 +1,81 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_LIBIO_H_ +# define _INCLUDED_CPP_LIBIO_H_ 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 _LIBIO_NEED_C_LEGACY_ +# endif + +# include + + // Expose global C names, including non-standard ones, but shadow + // some names and types with the std:: C++ version. + + // NB: Cannot use typedefs here to inject the names as the "C" headers + // often include typedefs that include the keyword 'struct' + using _C_legacy::_IO_pos_t; + using _C_legacy::_IO_fpos_t; + using _C_legacy::_IO_fpos64_t; + using _C_legacy::_IO_size_t; + using _C_legacy::_IO_ssize_t; + using _C_legacy::_IO_off_t; + using _C_legacy::_IO_off64_t; + using _C_legacy::_IO_pid_t; + using _C_legacy::_IO_uid_t; + using _C_legacy::_IO_iconv_t; + using _C_legacy::_IO_va_list; + using _C_legacy::_IO_wint_t; + using _C_legacy::_IO_lock_t; + + using _C_legacy::_IO_marker; + using _C_legacy::_IO_codecvt; + using _C_legacy::_IO_wide_data; + using _C_legacy::_IO_FILE; + using _C_legacy::_IO_cookie_io_functions_t; + using _C_legacy::_IO_cookie_file; + +# ifdef _LIBIO_NEED_C_LEGACY_ + // dive back into the "swamp" + namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# undef _LIBIO_NEED_C_LEGACY_ +# endif /* _LIBIO_NEED_C_LEGACY_ */ +#endif /* _INCLUDED_CPP_LIBIO_H_ */ + + + + diff --git a/libstdc++-v3/include/c_shadow/libioP.h b/libstdc++-v3/include/c_shadow/libioP.h new file mode 100644 index 00000000000..da3e716768f --- /dev/null +++ b/libstdc++-v3/include/c_shadow/libioP.h @@ -0,0 +1,64 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_LIBIOP_H_ +# define _INCLUDED_CPP_LIBIOP_H_ 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 _LIBIOP_NEED_C_LEGACY_ +# endif + +# include + + // Expose global C names, including non-standard ones, but shadow + // some names and types with the std:: C++ version. + using _C_legacy::_IO_jump_t; + using _C_legacy::_IO_FILE_plus; + using _C_legacy::_IO_cookie_file; + + using _C_legacy::_IO_file_jumps; + using _C_legacy::_IO_wfile_jumps; + +# ifdef _LIBIOP_NEED_C_LEGACY_ + // dive back into the "swamp" + namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# undef _LIBIOP_NEED_C_LEGACY_ +# endif /* _LIBIOP_NEED_C_LEGACY_ */ +#endif /* _INCLUDED_CPP_LIBIOP_H_ */ + + + + diff --git a/libstdc++-v3/include/c_shadow/limits.h b/libstdc++-v3/include/c_shadow/limits.h new file mode 100644 index 00000000000..26aa771f2d5 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/limits.h @@ -0,0 +1,54 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_LIMITS_H_ +# define _INCLUDED_CPP_LIMITS_H_ 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 + +# include + + // 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 /* _INCLUDED_CPP_LIMITS_H_ */ diff --git a/libstdc++-v3/include/c_shadow/locale.h b/libstdc++-v3/include/c_shadow/locale.h new file mode 100644 index 00000000000..1d5f529ed89 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/locale.h @@ -0,0 +1,57 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_LOCALE_H_ +# define _INCLUDED_CPP_LOCALE_H_ 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 _LOCALE_NEED_C_LEGACY_ +#endif + +# include + + // 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 /* _INCLUDED_CPP_LOCALE_H_ */ diff --git a/libstdc++-v3/include/c_shadow/math.h b/libstdc++-v3/include/c_shadow/math.h new file mode 100644 index 00000000000..f2ec04af671 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/math.h @@ -0,0 +1,131 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_MATH_H_ +# define _INCLUDED_CPP_MATH_H_ 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 + + // 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 /* _INCLUDED_CPP_MATH_H_ */ + + + + diff --git a/libstdc++-v3/include/c_shadow/pthread.h b/libstdc++-v3/include/c_shadow/pthread.h new file mode 100644 index 00000000000..8692d3e52d4 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/pthread.h @@ -0,0 +1,86 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_PTHREAD_H_ +# define _INCLUDED_CPP_PTHREAD_H_ 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 _PTHREAD_NEED_C_LEGACY_ +# endif + +# include + + // Expose global C names, including non-standard ones, but shadow + // some names and types with the std:: C++ version. + using _C_legacy::__sched_param; + + using _C_legacy::pthread_attr_t; + using _C_legacy::pthread_cond_t; + using _C_legacy::pthread_condattr_t; + using _C_legacy::pthread_key_t; + using _C_legacy::pthread_mutex_t; + using _C_legacy::pthread_mutexattr_t; + using _C_legacy::pthread_once_t; + using _C_legacy::pthread_rwlock_t; + using _C_legacy::pthread_rwlockattr_t; + using _C_legacy::pthread_t; + + using _C_legacy::pthread_mutex_init; + using _C_legacy::pthread_mutex_destroy; + using _C_legacy::pthread_mutex_lock; + using _C_legacy::pthread_mutex_trylock; + using _C_legacy::pthread_mutex_unlock; + using _C_legacy::pthread_mutexattr_init; + using _C_legacy::pthread_mutexattr_destroy; + using _C_legacy::pthread_mutexattr_settype; + using _C_legacy::pthread_mutexattr_gettype; + using _C_legacy::pthread_key_create; + using _C_legacy::pthread_key_delete; + using _C_legacy::pthread_setspecific; + using _C_legacy::pthread_getspecific; + using _C_legacy::pthread_once; + using _C_legacy::pthread_atfork; + +# ifdef _PTHREAD_NEED_C_LEGACY_ + // dive back into the "swamp" + namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# undef _PTHREAD_NEED_C_LEGACY_ +# endif /* _PTHREAD_NEED_C_LEGACY_ */ +#endif /* _INCLUDED_CPP_PTHREAD_H_ */ + + + + diff --git a/libstdc++-v3/include/c_shadow/setjmp.h b/libstdc++-v3/include/c_shadow/setjmp.h new file mode 100644 index 00000000000..c4061e871db --- /dev/null +++ b/libstdc++-v3/include/c_shadow/setjmp.h @@ -0,0 +1,56 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_SETJMP_H_ +# define _INCLUDED_CPP_SETJMP_H_ 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 + +# include + + // 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 /* _INCLUDED_CPP_SETJMP_H_ */ diff --git a/libstdc++-v3/include/c_shadow/signal.h b/libstdc++-v3/include/c_shadow/signal.h new file mode 100644 index 00000000000..819ddf22f32 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/signal.h @@ -0,0 +1,58 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_SIGNAL_H_ +# define _INCLUDED_CPP_SIGNAL_H_ 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 + +# include + + // 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 /* _INCLUDED_CPP_SIGNAL_H_ */ diff --git a/libstdc++-v3/include/c_shadow/stdarg.h b/libstdc++-v3/include/c_shadow/stdarg.h new file mode 100644 index 00000000000..cb32feca7d6 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/stdarg.h @@ -0,0 +1,55 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_STDARG_H_ +# define _INCLUDED_CPP_STDARG_H_ 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 + +# include + + // 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 /* _INCLUDED_CPP_STDARG_H_ */ diff --git a/libstdc++-v3/include/c_shadow/stddef.h b/libstdc++-v3/include/c_shadow/stddef.h new file mode 100644 index 00000000000..03d5896779e --- /dev/null +++ b/libstdc++-v3/include/c_shadow/stddef.h @@ -0,0 +1,60 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_STDDEF_H_ +# define _INCLUDED_CPP_STDDEF_H_ 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 + +# include + + // 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; + +# 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 /* _INCLUDED_CPP_STDDEF_H_ */ + + + + diff --git a/libstdc++-v3/include/c_shadow/stdio.h b/libstdc++-v3/include/c_shadow/stdio.h new file mode 100644 index 00000000000..c3a43b736c2 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/stdio.h @@ -0,0 +1,97 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +#ifndef _INCLUDED_CPP_STDIO_H_ +# define _INCLUDED_CPP_STDIO_H_ 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 + + // 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 /* _INCLUDED_CPP_STDIO_H_ */ diff --git a/libstdc++-v3/include/c_shadow/stdlib.h b/libstdc++-v3/include/c_shadow/stdlib.h new file mode 100644 index 00000000000..c75cc5c068f --- /dev/null +++ b/libstdc++-v3/include/c_shadow/stdlib.h @@ -0,0 +1,101 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_STDLIB_H_ +# define _INCLUDED_CPP_STDLIB_H_ 1 + +# include + +# 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 + + // 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; + + using std::strtof; + +#ifdef _GLIBCPP_USE_LONG_LONG + using std::strtoll; + using std::strtoull; +#endif + +#ifdef _GLIBCPP_HAVE_STRTOLD + 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 /* _INCLUDED_CPP_STDLIB_H_ */ diff --git a/libstdc++-v3/include/c_shadow/string.h b/libstdc++-v3/include/c_shadow/string.h new file mode 100644 index 00000000000..6f9e6cc6372 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/string.h @@ -0,0 +1,76 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_STRING_H_ +# define _INCLUDED_CPP_STRING_H_ 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 + +# include + + // 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 /* _INCLUDED_CPP_STRING_H_ */ diff --git a/libstdc++-v3/include/c_shadow/sys/cdefs.h b/libstdc++-v3/include/c_shadow/sys/cdefs.h new file mode 100644 index 00000000000..da377faadbc --- /dev/null +++ b/libstdc++-v3/include/c_shadow/sys/cdefs.h @@ -0,0 +1,49 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _CPP_SYS_CDEFS_H +# define _CPP_SYS_CDEFS_H 1 + +# pragma GCC system_header +# include_next + +// glibc-2 hackery. Other systems likely require other hacks. +#undef __BEGIN_DECLS +#define __BEGIN_DECLS +#undef __END_DECLS +#define __END_DECLS + +#endif /* _CPP_SYS_CDEFS_H_ */ + + + + + + diff --git a/libstdc++-v3/include/c_shadow/time.h b/libstdc++-v3/include/c_shadow/time.h new file mode 100644 index 00000000000..31064aaa135 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/time.h @@ -0,0 +1,67 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_TIME_H_ +# define _INCLUDED_CPP_TIME_H_ 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 + + // 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 /* _INCLUDED_CPP_TIME_H_ */ diff --git a/libstdc++-v3/include/c_shadow/unistd.h b/libstdc++-v3/include/c_shadow/unistd.h new file mode 100644 index 00000000000..e05efe72f57 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/unistd.h @@ -0,0 +1,101 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_UNISTD_H_ +# define _INCLUDED_CPP_UNISTD_H_ 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 + + // Expose global C names, including non-standard ones, but shadow + // some names and types with the std:: C++ version. +#ifdef __gid_t_defined + using _C_legacy::gid_t; +#endif +#ifdef __uid_t_defined + using _C_legacy::uid_t; +#endif +#ifdef __off_t_defined + using _C_legacy::off_t; +#endif +#ifdef __off64_t_defined + using _C_legacy::off64_t; +#endif +#ifdef __useconds_t_defined + using _C_legacy::useconds_t; +#endif +#ifdef __pid_t_defined + using _C_legacy::pid_t; +#endif + using _C_legacy::intptr_t; +#ifdef __socklen_t_defined + using _C_legacy::socklen_t; +#endif + + using _C_legacy::access; + using _C_legacy::euidaccess; + using _C_legacy::lseek; + using _C_legacy::close; + using _C_legacy::read; + using _C_legacy::write; + using _C_legacy::pread; + using _C_legacy::pwrite; + using _C_legacy::pipe; + using _C_legacy::alarm; + using _C_legacy::sleep; + using _C_legacy::ualarm; + using _C_legacy::usleep; + using _C_legacy::pause; + using _C_legacy::chown; + using _C_legacy::fchown; + using _C_legacy::lchown; + using _C_legacy::chdir; + using _C_legacy::fchdir; + using _C_legacy::getcwd; + using _C_legacy::get_current_dir_name; + using _C_legacy::getwd; + using _C_legacy::dup; + using _C_legacy::dup2; + +# 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 /* _INCLUDED_CPP_UNISTD_H_ */ diff --git a/libstdc++-v3/include/c_shadow/wchar.h b/libstdc++-v3/include/c_shadow/wchar.h new file mode 100644 index 00000000000..efabb1519a5 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/wchar.h @@ -0,0 +1,131 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_WCHAR_H_ +# define _INCLUDED_CPP_WCHAR_H_ 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 + + // Expose global C names, including non-standard ones, but shadow + // some names and types with the std:: C++ version. + using std::wchar_t; + 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 /* _INCLUDED_CPP_WCHAR_H_ */ + + + diff --git a/libstdc++-v3/include/c_shadow/wctype.h b/libstdc++-v3/include/c_shadow/wctype.h new file mode 100644 index 00000000000..cae1aff43e1 --- /dev/null +++ b/libstdc++-v3/include/c_shadow/wctype.h @@ -0,0 +1,74 @@ +// -*- C++ -*- header wrapper. + +// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + +#ifndef _INCLUDED_CPP_CWCTYPE_H_ +# define _INCLUDED_CPP_CWCTYPE_H_ 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 + + // 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 /* _INCLUDED_CPP_CWCTYPE_H_ */ -- 2.30.2