From: Benjamin Kosnik Date: Thu, 21 Dec 2000 23:58:35 +0000 (+0000) Subject: configure.in: Change GLIBCPP_ENABLE_SHADOW to GLIBCPP_ENABLE_CHEADERS. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1aa040fc77cf428917178cb4945253def6c98912;p=gcc.git 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: r38437 --- 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 - - - - - - -