diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-01-31 20:50:29 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-01-31 20:50:29 +0000 |
commit | a370588ba80f172c769c599cdff220f6a6ae29f7 (patch) | |
tree | e133e2fbe052f58d5084886152555e26bf8e537d /gnu/lib/libstdc++ | |
parent | 14d92a26c5db745bbf8999bb6a11902aeeedcd37 (diff) |
fix a few #if MACRO -> #if defined(MACRO) (-Wsystem-headers clean-up)
naddy, sturm, brad: tests, comments, fixes... thanks.
Diffstat (limited to 'gnu/lib/libstdc++')
32 files changed, 116 insertions, 116 deletions
diff --git a/gnu/lib/libstdc++/libstdc++/config/io/c_io_stdio.h b/gnu/lib/libstdc++/libstdc++/config/io/c_io_stdio.h index 0d11d14d3f9..a46e243cf9f 100644 --- a/gnu/lib/libstdc++/libstdc++/config/io/c_io_stdio.h +++ b/gnu/lib/libstdc++/libstdc++/config/io/c_io_stdio.h @@ -41,7 +41,7 @@ namespace std // for fpos.h typedef long streamoff; typedef ptrdiff_t streamsize; // Signed integral type -#if _GLIBCPP_USE_WCHAR_T +#if defined(_GLIBCPP_USE_WCHAR_T) typedef ptrdiff_t wstreamsize; #endif typedef fpos_t __c_streampos; diff --git a/gnu/lib/libstdc++/libstdc++/docs/html/17_intro/headers_cc.txt b/gnu/lib/libstdc++/libstdc++/docs/html/17_intro/headers_cc.txt index eb930f1ff00..9a5a98a3b81 100644 --- a/gnu/lib/libstdc++/libstdc++/docs/html/17_intro/headers_cc.txt +++ b/gnu/lib/libstdc++/libstdc++/docs/html/17_intro/headers_cc.txt @@ -75,7 +75,7 @@ // "C" headers that might not work if wchar_t support is disabled. #include <bits/c++config.h> -#if _GLIBCPP_USE_WCHAR_T +#if defined(_GLIBCPP_USE_WCHAR_T) #include <cwchar> #include <cwctype> #endif diff --git a/gnu/lib/libstdc++/libstdc++/include/bits/basic_ios.tcc b/gnu/lib/libstdc++/libstdc++/include/bits/basic_ios.tcc index 1c9cd3b7256..d53889908df 100644 --- a/gnu/lib/libstdc++/libstdc++/include/bits/basic_ios.tcc +++ b/gnu/lib/libstdc++/libstdc++/include/bits/basic_ios.tcc @@ -207,7 +207,7 @@ namespace std // Inhibit implicit instantiations for required instantiations, // which are defined via explicit instantiations elsewhere. // NB: This syntax is a GNU extension. -#if _GLIBCPP_EXTERN_TEMPLATE +#if defined(_GLIBCPP_EXTERN_TEMPLATE) extern template class basic_ios<char>; #ifdef _GLIBCPP_USE_WCHAR_T diff --git a/gnu/lib/libstdc++/libstdc++/include/bits/basic_string.tcc b/gnu/lib/libstdc++/libstdc++/include/bits/basic_string.tcc index d3f1e8e3605..d58ac01f0b1 100644 --- a/gnu/lib/libstdc++/libstdc++/include/bits/basic_string.tcc +++ b/gnu/lib/libstdc++/libstdc++/include/bits/basic_string.tcc @@ -1057,7 +1057,7 @@ namespace std // Inhibit implicit instantiations for required instantiations, // which are defined via explicit instantiations elsewhere. // NB: This syntax is a GNU extension. -#if _GLIBCPP_EXTERN_TEMPLATE +#if defined(_GLIBCPP_EXTERN_TEMPLATE) extern template class basic_string<char>; extern template basic_istream<char>& diff --git a/gnu/lib/libstdc++/libstdc++/include/bits/fstream.tcc b/gnu/lib/libstdc++/libstdc++/include/bits/fstream.tcc index c69ac9c7226..80a34f8f171 100644 --- a/gnu/lib/libstdc++/libstdc++/include/bits/fstream.tcc +++ b/gnu/lib/libstdc++/libstdc++/include/bits/fstream.tcc @@ -525,7 +525,7 @@ namespace std // Inhibit implicit instantiations for required instantiations, // which are defined via explicit instantiations elsewhere. // NB: This syntax is a GNU extension. -#if _GLIBCPP_EXTERN_TEMPLATE +#if defined(_GLIBCPP_EXTERN_TEMPLATE) extern template class basic_filebuf<char>; extern template class basic_ifstream<char>; extern template class basic_ofstream<char>; diff --git a/gnu/lib/libstdc++/libstdc++/include/bits/istream.tcc b/gnu/lib/libstdc++/libstdc++/include/bits/istream.tcc index ae0c5077e51..dcd96113a9e 100644 --- a/gnu/lib/libstdc++/libstdc++/include/bits/istream.tcc +++ b/gnu/lib/libstdc++/libstdc++/include/bits/istream.tcc @@ -1201,7 +1201,7 @@ namespace std // Inhibit implicit instantiations for required instantiations, // which are defined via explicit instantiations elsewhere. // NB: This syntax is a GNU extension. -#if _GLIBCPP_EXTERN_TEMPLATE +#if defined(_GLIBCPP_EXTERN_TEMPLATE) extern template class basic_istream<char>; extern template istream& ws(istream&); extern template istream& operator>>(istream&, char&); diff --git a/gnu/lib/libstdc++/libstdc++/include/c/std_cmath.h b/gnu/lib/libstdc++/libstdc++/include/c/std_cmath.h index beb7141625c..2f98bd77841 100644 --- a/gnu/lib/libstdc++/libstdc++/include/c/std_cmath.h +++ b/gnu/lib/libstdc++/libstdc++/include/c/std_cmath.h @@ -93,7 +93,7 @@ namespace std abs(long double __x) { return __builtin_fabsl(__x); } -#if _GLIBCPP_HAVE_MODFF +#if defined(_GLIBCPP_HAVE_MODFF) inline float modf(float __x, float* __iptr) { return modff(__x, __iptr); } #else @@ -107,7 +107,7 @@ namespace std } #endif -#if _GLIBCPP_HAVE_MODFL +#if defined(_GLIBCPP_HAVE_MODFL) inline long double modf(long double __x, long double* __iptr) { return modfl(__x, __iptr); } #else diff --git a/gnu/lib/libstdc++/libstdc++/include/c/std_cwchar.h b/gnu/lib/libstdc++/libstdc++/include/c/std_cwchar.h index d06f5e4efcd..d20eba5b191 100644 --- a/gnu/lib/libstdc++/libstdc++/include/c/std_cwchar.h +++ b/gnu/lib/libstdc++/libstdc++/include/c/std_cwchar.h @@ -40,7 +40,7 @@ #include <cstddef> #include <ctime> -#if _GLIBCPP_HAVE_WCHAR_H +#if defined(_GLIBCPP_HAVE_WCHAR_H) #include_next <wchar.h> #endif diff --git a/gnu/lib/libstdc++/libstdc++/include/c/std_cwctype.h b/gnu/lib/libstdc++/libstdc++/include/c/std_cwctype.h index d51569843a6..9e1a76b6cfc 100644 --- a/gnu/lib/libstdc++/libstdc++/include/c/std_cwctype.h +++ b/gnu/lib/libstdc++/libstdc++/include/c/std_cwctype.h @@ -38,7 +38,7 @@ #include <bits/c++config.h> -#if _GLIBCPP_HAVE_WCTYPE_H +#if defined(_GLIBCPP_HAVE_WCTYPE_H) #include_next <wctype.h> #endif diff --git a/gnu/lib/libstdc++/libstdc++/include/c_compatibility/math.h b/gnu/lib/libstdc++/libstdc++/include/c_compatibility/math.h index 4c4fd0a2178..dc3b9fe327a 100644 --- a/gnu/lib/libstdc++/libstdc++/include/c_compatibility/math.h +++ b/gnu/lib/libstdc++/libstdc++/include/c_compatibility/math.h @@ -56,7 +56,7 @@ using std::fabs; using std::floor; using std::fmod; -#if _GLIBCPP_USE_C99 +#if defined(_GLIBCPP_USE_C99) using std::fpclassify; using std::isfinite; using std::isinf; diff --git a/gnu/lib/libstdc++/libstdc++/include/c_compatibility/wchar.h b/gnu/lib/libstdc++/libstdc++/include/c_compatibility/wchar.h index e9485a54ded..a6a8f8f4a5b 100644 --- a/gnu/lib/libstdc++/libstdc++/include/c_compatibility/wchar.h +++ b/gnu/lib/libstdc++/libstdc++/include/c_compatibility/wchar.h @@ -34,7 +34,7 @@ using std::mbstate_t; -#if _GLIBCPP_USE_WCHAR_T +#if defined(_GLIBCPP_USE_WCHAR_T) using std::wint_t; using std::btowc; @@ -95,7 +95,7 @@ using std::wmemmove; using std::wmemset; using std::wcsftime; -#if _GLIBCPP_USE_C99 +#if defined(_GLIBCPP_USE_C99) using std::wcstold; using std::wcstoll; using std::wcstoull; diff --git a/gnu/lib/libstdc++/libstdc++/include/c_std/std_cmath.h b/gnu/lib/libstdc++/libstdc++/include/c_std/std_cmath.h index 1264c4dba69..ce204488cab 100644 --- a/gnu/lib/libstdc++/libstdc++/include/c_std/std_cmath.h +++ b/gnu/lib/libstdc++/libstdc++/include/c_std/std_cmath.h @@ -81,8 +81,8 @@ namespace __gnu_cxx { namespace __c99_binding { -#if _GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_CHECK || \ - _GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC +#if defined(_GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_CHECK) || \ + defined(_GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC) extern "C" float (acosf)(float); extern "C" float (asinf)(float); extern "C" float (atanf)(float); @@ -102,59 +102,59 @@ namespace __gnu_cxx extern "C" float (tanf)(float); extern "C" float (tanhf)(float); #endif -#if !_GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC -#if _GLIBCPP_HAVE_ACOSF +#if !defined(_GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC) +#if defined(_GLIBCPP_HAVE_ACOSF) using ::acosf; #endif -#if _GLIBCPP_HAVE_ASINF +#if defined(_GLIBCPP_HAVE_ASINF) using ::asinf; #endif -#if _GLIBCPP_HAVE_ATANF +#if defined(_GLIBCPP_HAVE_ATANF) using ::atanf; #endif -#if _GLIBCPP_HAVE_ATAN2F +#if defined(_GLIBCPP_HAVE_ATAN2F) using ::atan2f; #endif -#if _GLIBCPP_HAVE_CEILF +#if defined(_GLIBCPP_HAVE_CEILF) using ::ceilf; #endif -#if _GLIBCPP_HAVE_COSHF +#if defined(_GLIBCPP_HAVE_COSHF) using ::coshf; #endif -#if _GLIBCPP_HAVE_EXPF +#if defined(_GLIBCPP_HAVE_EXPF) using ::expf; #endif -#if _GLIBCPP_HAVE_FLOORF +#if defined(_GLIBCPP_HAVE_FLOORF) using ::floorf; #endif -#if _GLIBCPP_HAVE_FMODF +#if defined(_GLIBCPP_HAVE_FMODF) using ::fmodf; #endif -#if _GLIBCPP_HAVE_FREXPF +#if defined(_GLIBCPP_HAVE_FREXPF) using ::frexpf; #endif -#if _GLIBCPP_HAVE_LDEXPF +#if defined(_GLIBCPP_HAVE_LDEXPF) using ::ldexpf; #endif -#if _GLIBCPP_HAVE_LOGF +#if defined(_GLIBCPP_HAVE_LOGF) using ::logf; #endif -#if _GLIBCPP_HAVE_LOG10F +#if defined(_GLIBCPP_HAVE_LOG10F) using ::log10f; #endif -#if _GLIBCPP_HAVE_MODFF +#if defined(_GLIBCPP_HAVE_MODFF) using ::modff; #endif -#if _GLIBCPP_HAVE_POWF +#if defined(_GLIBCPP_HAVE_POWF) using ::powf; #endif -#if _GLIBCPP_HAVE_SINHF +#if defined(_GLIBCPP_HAVE_SINHF) using ::sinhf; #endif -#if _GLIBCPP_HAVE_TANF +#if defined(_GLIBCPP_HAVE_TANF) using ::tanf; #endif -#if _GLIBCPP_HAVE_TANHF +#if defined(_GLIBCPP_HAVE_TANHF) using ::tanhf; #endif #endif /* _GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC */ @@ -179,7 +179,7 @@ namespace std abs(long double __x) { return __builtin_fabsl(__x); } -#if _GLIBCPP_HAVE_ACOSF +#if defined(_GLIBCPP_HAVE_ACOSF) inline float acos(float __x) { return __gnu_cxx::__c99_binding::acosf(__x); } #else @@ -189,7 +189,7 @@ namespace std using ::acos; -#if _GLIBCPP_HAVE_ACOSL +#if defined(_GLIBCPP_HAVE_ACOSL) inline long double acos(long double __x) { return ::acosl(__x); } #else @@ -199,7 +199,7 @@ namespace std using ::asin; -#if _GLIBCPP_HAVE_ASINF +#if defined(_GLIBCPP_HAVE_ASINF) inline float asin(float __x) { return __gnu_cxx::__c99_binding::asinf(__x); } #else @@ -207,7 +207,7 @@ namespace std asin(float __x) { return ::asin(static_cast<double>(__x)); } #endif -#if _GLIBCPP_HAVE_ASINL +#if defined(_GLIBCPP_HAVE_ASINL) inline long double asin(long double __x) { return ::asinl(__x); } #else @@ -217,7 +217,7 @@ namespace std using ::atan; -#if _GLIBCPP_HAVE_ATANF +#if defined(_GLIBCPP_HAVE_ATANF) inline float atan(float __x) { return __gnu_cxx::__c99_binding::atanf(__x); } #else @@ -225,7 +225,7 @@ namespace std atan(float __x) { return ::atan(static_cast<double>(__x)); } #endif -#if _GLIBCPP_HAVE_ATANL +#if defined(_GLIBCPP_HAVE_ATANL) inline long double atan(long double __x) { return ::atanl(__x); } #else @@ -235,7 +235,7 @@ namespace std using ::atan2; -#if _GLIBCPP_HAVE_ATAN2F +#if defined(_GLIBCPP_HAVE_ATAN2F) inline float atan2(float __y, float __x) { return __gnu_cxx::__c99_binding::atan2f(__y, __x); } #else @@ -244,7 +244,7 @@ namespace std { return ::atan2(static_cast<double>(__y), static_cast<double>(__x)); } #endif -#if _GLIBCPP_HAVE_ATAN2L +#if defined(_GLIBCPP_HAVE_ATAN2L) inline long double atan2(long double __y, long double __x) { return ::atan2l(__y, __x); } #else @@ -255,7 +255,7 @@ namespace std using ::ceil; -#if _GLIBCPP_HAVE_CEILF +#if defined(_GLIBCPP_HAVE_CEILF) inline float ceil(float __x) { return __gnu_cxx::__c99_binding::ceilf(__x); } #else @@ -263,7 +263,7 @@ namespace std ceil(float __x) { return ::ceil(static_cast<double>(__x)); } #endif -#if _GLIBCPP_HAVE_CEILL +#if defined(_GLIBCPP_HAVE_CEILL) inline long double ceil(long double __x) { return ::ceill(__x); } #else @@ -283,7 +283,7 @@ namespace std using ::cosh; -#if _GLIBCPP_HAVE_COSHF +#if defined(_GLIBCPP_HAVE_COSHF) inline float cosh(float __x) { return __gnu_cxx::__c99_binding::coshf(__x); } #else @@ -291,7 +291,7 @@ namespace std cosh(float __x) { return ::cosh(static_cast<double>(__x)); } #endif -#if _GLIBCPP_HAVE_COSHL +#if defined(_GLIBCPP_HAVE_COSHL) inline long double cosh(long double __x) { return ::coshl(__x); } #else @@ -301,7 +301,7 @@ namespace std using ::exp; -#if _GLIBCPP_HAVE_EXPF +#if defined(_GLIBCPP_HAVE_EXPF) inline float exp(float __x) { return __gnu_cxx::__c99_binding::expf(__x); } #else @@ -309,7 +309,7 @@ namespace std exp(float __x) { return ::exp(static_cast<double>(__x)); } #endif -#if _GLIBCPP_HAVE_EXPL +#if defined(_GLIBCPP_HAVE_EXPL) inline long double exp(long double __x) { return ::expl(__x); } #else @@ -329,7 +329,7 @@ namespace std using ::floor; -#if _GLIBCPP_HAVE_FLOORF +#if defined(_GLIBCPP_HAVE_FLOORF) inline float floor(float __x) { return __gnu_cxx::__c99_binding::floorf(__x); } #else @@ -337,7 +337,7 @@ namespace std floor(float __x) { return ::floor(static_cast<double>(__x)); } #endif -#if _GLIBCPP_HAVE_FLOORL +#if defined(_GLIBCPP_HAVE_FLOORL) inline long double floor(long double __x) { return ::floorl(__x); } #else @@ -347,7 +347,7 @@ namespace std using ::fmod; -#if _GLIBCPP_HAVE_FMODF +#if defined(_GLIBCPP_HAVE_FMODF) inline float fmod(float __x, float __y) { return __gnu_cxx::__c99_binding::fmodf(__x, __y); } #else @@ -356,7 +356,7 @@ namespace std { return ::fmod(static_cast<double>(__x), static_cast<double>(__y)); } #endif -#if _GLIBCPP_HAVE_FMODL +#if defined(_GLIBCPP_HAVE_FMODL) inline long double fmod(long double __x, long double __y) { return ::fmodl(__x, __y); } #else @@ -367,7 +367,7 @@ namespace std using ::frexp; -#if _GLIBCPP_HAVE_FREXPF +#if defined(_GLIBCPP_HAVE_FREXPF) inline float frexp(float __x, int* __exp) { return __gnu_cxx::__c99_binding::frexpf(__x, __exp); } #else @@ -375,7 +375,7 @@ namespace std frexp(float __x, int* __exp) { return ::frexp(__x, __exp); } #endif -#if _GLIBCPP_HAVE_FREXPL +#if defined(_GLIBCPP_HAVE_FREXPL) inline long double frexp(long double __x, int* __exp) { return ::frexpl(__x, __exp); } #else @@ -386,7 +386,7 @@ namespace std using ::ldexp; -#if _GLIBCPP_HAVE_LDEXPF +#if defined(_GLIBCPP_HAVE_LDEXPF) inline float ldexp(float __x, int __exp) { return __gnu_cxx::__c99_binding::ldexpf(__x, __exp); } #else @@ -395,7 +395,7 @@ namespace std { return ::ldexp(static_cast<double>(__x), __exp); } #endif -#if _GLIBCPP_HAVE_LDEXPL +#if defined(_GLIBCPP_HAVE_LDEXPL) inline long double ldexp(long double __x, int __exp) { return ::ldexpl(__x, __exp); } #else @@ -406,7 +406,7 @@ namespace std using ::log; -#if _GLIBCPP_HAVE_LOGF +#if defined(_GLIBCPP_HAVE_LOGF) inline float log(float __x) { return __gnu_cxx::__c99_binding::logf(__x); } #else @@ -414,7 +414,7 @@ namespace std { return ::log(static_cast<double>(__x)); } #endif -#if _GLIBCPP_HAVE_LOGL +#if defined(_GLIBCPP_HAVE_LOGL) inline long double log(long double __x) { return ::logl(__x); } #else @@ -424,7 +424,7 @@ namespace std using ::log10; -#if _GLIBCPP_HAVE_LOG10F +#if defined(_GLIBCPP_HAVE_LOG10F) inline float log10(float __x) { return __gnu_cxx::__c99_binding::log10f(__x); } #else @@ -432,7 +432,7 @@ namespace std log10(float __x) { return ::log10(static_cast<double>(__x)); } #endif -#if _GLIBCPP_HAVE_LOG10L +#if defined(_GLIBCPP_HAVE_LOG10L) inline long double log10(long double __x) { return ::log10l(__x); } #else @@ -442,7 +442,7 @@ namespace std using ::modf; -#if _GLIBCPP_HAVE_MODFF +#if defined(_GLIBCPP_HAVE_MODFF) inline float modf(float __x, float* __iptr) { return __gnu_cxx::__c99_binding::modff(__x, __iptr); } #else @@ -456,7 +456,7 @@ namespace std } #endif -#if _GLIBCPP_HAVE_MODFL +#if defined(_GLIBCPP_HAVE_MODFL) inline long double modf(long double __x, long double* __iptr) { return ::modfl(__x, __iptr); } #else @@ -481,7 +481,7 @@ namespace std using ::pow; -#if _GLIBCPP_HAVE_POWF +#if defined(_GLIBCPP_HAVE_POWF) inline float pow(float __x, float __y) { return __gnu_cxx::__c99_binding::powf(__x, __y); } #else @@ -490,7 +490,7 @@ namespace std { return ::pow(static_cast<double>(__x), static_cast<double>(__y)); } #endif -#if _GLIBCPP_HAVE_POWL +#if defined(_GLIBCPP_HAVE_POWL) inline long double pow(long double __x, long double __y) { return ::powl(__x, __y); } #else @@ -523,7 +523,7 @@ namespace std using ::sinh; -#if _GLIBCPP_HAVE_SINHF +#if defined(_GLIBCPP_HAVE_SINHF) inline float sinh(float __x) { return __gnu_cxx::__c99_binding::sinhf(__x); } #else @@ -531,7 +531,7 @@ namespace std sinh(float __x) { return ::sinh(static_cast<double>(__x)); } #endif -#if _GLIBCPP_HAVE_SINHL +#if defined(_GLIBCPP_HAVE_SINHL) inline long double sinh(long double __x) { return ::sinhl(__x); } #else @@ -551,7 +551,7 @@ namespace std using ::tan; -#if _GLIBCPP_HAVE_TANF +#if defined(_GLIBCPP_HAVE_TANF) inline float tan(float __x) { return __gnu_cxx::__c99_binding::tanf(__x); } #else @@ -559,7 +559,7 @@ namespace std tan(float __x) { return ::tan(static_cast<double>(__x)); } #endif -#if _GLIBCPP_HAVE_TANL +#if defined(_GLIBCPP_HAVE_TANL) inline long double tan(long double __x) { return ::tanl(__x); } #else @@ -569,7 +569,7 @@ namespace std using ::tanh; -#if _GLIBCPP_HAVE_TANHF +#if defined(_GLIBCPP_HAVE_TANHF) inline float tanh(float __x) { return __gnu_cxx::__c99_binding::tanhf(__x); } #else @@ -577,7 +577,7 @@ namespace std tanh(float __x) { return ::tanh(static_cast<double>(__x)); } #endif -#if _GLIBCPP_HAVE_TANHL +#if defined(_GLIBCPP_HAVE_TANHL) inline long double tanh(long double __x) { return ::tanhl(__x); } #else @@ -587,8 +587,8 @@ namespace std } -#if _GLIBCPP_USE_C99 -#if !_GLIBCPP_USE_C99_FP_MACROS_DYNAMIC +#if defined(_GLIBCPP_USE_C99) +#if !defined(_GLIBCPP_USE_C99_FP_MACROS_DYNAMIC) // These are possible macros imported from C99-land. For strict // conformance, remove possible C99-injected names from the global // namespace, and sequester them in the __gnu_cxx extension namespace. @@ -663,8 +663,8 @@ namespace __gnu_cxx #undef islessgreater #undef isunordered -#if _GLIBCPP_USE_C99 -#if !_GLIBCPP_USE_C99_FP_MACROS_DYNAMIC +#if defined(_GLIBCPP_USE_C99) +#if !defined(_GLIBCPP_USE_C99_FP_MACROS_DYNAMIC) namespace __gnu_cxx { template<typename _Tp> diff --git a/gnu/lib/libstdc++/libstdc++/include/c_std/std_cstdio.h b/gnu/lib/libstdc++/libstdc++/include/c_std/std_cstdio.h index 3b4a6856739..00378ce4c7f 100644 --- a/gnu/lib/libstdc++/libstdc++/include/c_std/std_cstdio.h +++ b/gnu/lib/libstdc++/libstdc++/include/c_std/std_cstdio.h @@ -142,7 +142,7 @@ namespace std using ::vsprintf; } -#if _GLIBCPP_USE_C99 +#if defined(_GLIBCPP_USE_C99) #undef snprintf #undef vfscanf @@ -152,7 +152,7 @@ namespace std namespace __gnu_cxx { -#if _GLIBCPP_USE_C99_CHECK || _GLIBCPP_USE_C99_DYNAMIC +#if defined(_GLIBCPP_USE_C99_CHECK) || defined(_GLIBCPP_USE_C99_DYNAMIC) extern "C" int (snprintf)(char * restrict, size_t, const char * restrict, ...); extern "C" int @@ -163,7 +163,7 @@ namespace __gnu_cxx extern "C" int (vsscanf)(const char * restrict, const char * restrict, __gnuc_va_list); #endif -#if !_GLIBCPP_USE_C99_DYNAMIC +#if !defined(_GLIBCPP_USE_C99_DYNAMIC) using ::snprintf; using ::vfscanf; using ::vscanf; diff --git a/gnu/lib/libstdc++/libstdc++/include/c_std/std_cstdlib.h b/gnu/lib/libstdc++/libstdc++/include/c_std/std_cstdlib.h index e1436be1d7a..01056c9e09b 100644 --- a/gnu/lib/libstdc++/libstdc++/include/c_std/std_cstdlib.h +++ b/gnu/lib/libstdc++/libstdc++/include/c_std/std_cstdlib.h @@ -122,7 +122,7 @@ namespace std div(long __i, long __j) { return ldiv(__i, __j); } } -#if _GLIBCPP_USE_C99 +#if defined(_GLIBCPP_USE_C99) #undef _Exit #undef llabs @@ -135,13 +135,13 @@ namespace std namespace __gnu_cxx { -#if !_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC +#if !defined(_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC) using ::lldiv_t; #endif -#if _GLIBCPP_USE_C99_CHECK || _GLIBCPP_USE_C99_DYNAMIC +#if defined(_GLIBCPP_USE_C99_CHECK) || defined(_GLIBCPP_USE_C99_DYNAMIC) extern "C" void (_Exit)(int); #endif -#if !_GLIBCPP_USE_C99_DYNAMIC +#if !defined(_GLIBCPP_USE_C99_DYNAMIC) using ::_Exit; #endif @@ -151,7 +151,7 @@ namespace __gnu_cxx inline long long llabs(long long __x) { return __x >= 0 ? __x : -__x; } -#if !_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC +#if !defined(_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC) inline lldiv_t div(long long __n, long long __d) { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } @@ -161,14 +161,14 @@ namespace __gnu_cxx { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } #endif -#if _GLIBCPP_USE_C99_LONG_LONG_CHECK || _GLIBCPP_USE_C99_LONG_LONG_DYNAMIC +#if defined(_GLIBCPP_USE_C99_LONG_LONG_CHECK) || defined(_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC) extern "C" long long int (atoll)(const char *); extern "C" long long int (strtoll)(const char * restrict, char ** restrict, int); extern "C" unsigned long long int (strtoull)(const char * restrict, char ** restrict, int); #endif -#if !_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC +#if !defined(_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC) using ::atoll; using ::strtoll; using ::strtoull; @@ -179,13 +179,13 @@ namespace __gnu_cxx namespace std { -#if !_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC +#if !defined(_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC) using __gnu_cxx::lldiv_t; #endif using __gnu_cxx::_Exit; using __gnu_cxx::abs; using __gnu_cxx::llabs; -#if !_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC +#if !defined(_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC) using __gnu_cxx::div; using __gnu_cxx::lldiv; #endif diff --git a/gnu/lib/libstdc++/libstdc++/include/c_std/std_cwchar.h b/gnu/lib/libstdc++/libstdc++/include/c_std/std_cwchar.h index 8b33c52282f..a2c75430699 100644 --- a/gnu/lib/libstdc++/libstdc++/include/c_std/std_cwchar.h +++ b/gnu/lib/libstdc++/libstdc++/include/c_std/std_cwchar.h @@ -129,7 +129,7 @@ namespace std #undef wprintf #undef wscanf -#if _GLIBCPP_USE_WCHAR_T +#if defined(_GLIBCPP_USE_WCHAR_T) namespace std { using ::wint_t; @@ -217,7 +217,7 @@ namespace std { return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); } } -#if _GLIBCPP_USE_C99 +#if defined(_GLIBCPP_USE_C99) #undef wcstold #undef wcstoll @@ -225,20 +225,20 @@ namespace std namespace __gnu_cxx { -#if _GLIBCPP_USE_C99_CHECK || _GLIBCPP_USE_C99_DYNAMIC +#if defined(_GLIBCPP_USE_C99_CHECK) || defined(_GLIBCPP_USE_C99_DYNAMIC) extern "C" long double (wcstold)(const wchar_t * restrict, wchar_t ** restrict); #endif -#if !_GLIBCPP_USE_C99_DYNAMIC +#if !defined(_GLIBCPP_USE_C99_DYNAMIC) using ::wcstold; #endif -#if _GLIBCPP_USE_C99_LONG_LONG_CHECK || _GLIBCPP_USE_C99_LONG_LONG_DYNAMIC +#if defined(_GLIBCPP_USE_C99_LONG_LONG_CHECK) || defined(_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC) extern "C" long long int (wcstoll)(const wchar_t * restrict, wchar_t ** restrict, int); extern "C" unsigned long long int (wcstoull)(const wchar_t * restrict, wchar_t ** restrict, int); #endif -#if !_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC +#if !defined(_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC) using ::wcstoll; using ::wcstoull; #endif diff --git a/gnu/lib/libstdc++/libstdc++/include/c_std/std_cwctype.h b/gnu/lib/libstdc++/libstdc++/include/c_std/std_cwctype.h index e469194aa19..c3117d65b75 100644 --- a/gnu/lib/libstdc++/libstdc++/include/c_std/std_cwctype.h +++ b/gnu/lib/libstdc++/libstdc++/include/c_std/std_cwctype.h @@ -73,7 +73,7 @@ #undef wctrans #undef wctype -#if _GLIBCPP_USE_WCHAR_T +#if defined(_GLIBCPP_USE_WCHAR_T) namespace std { using ::wint_t; // cwchar diff --git a/gnu/lib/libstdc++/libstdc++/libio/wfiledoalloc.c b/gnu/lib/libstdc++/libstdc++/libio/wfiledoalloc.c index 9c051620414..dddbd44fd3b 100644 --- a/gnu/lib/libstdc++/libstdc++/libio/wfiledoalloc.c +++ b/gnu/lib/libstdc++/libstdc++/libio/wfiledoalloc.c @@ -92,7 +92,7 @@ _IO_wfile_doallocate (fp) else { couldbetty = S_ISCHR (st.st_mode); -#if _IO_HAVE_ST_BLKSIZE +#if defined(_IO_HAVE_ST_BLKSIZE) size = st.st_blksize <= 0 ? _IO_BUFSIZ : st.st_blksize; #else size = _IO_BUFSIZ; diff --git a/gnu/lib/libstdc++/libstdc++/testsuite/17_intro/header_cwctype.cc b/gnu/lib/libstdc++/libstdc++/testsuite/17_intro/header_cwctype.cc index ba315b49ce0..45258bea751 100644 --- a/gnu/lib/libstdc++/libstdc++/testsuite/17_intro/header_cwctype.cc +++ b/gnu/lib/libstdc++/libstdc++/testsuite/17_intro/header_cwctype.cc @@ -20,7 +20,7 @@ // 17.4.1.2 Headers, cwctype -#if _GLIBCPP_USE_WCHAR_T +#if defined(_GLIBCPP_USE_WCHAR_T) #include <cwctype> // Make sure wint_t is in namespace std std::wint_t i = 5; diff --git a/gnu/lib/libstdc++/libstdc++/testsuite/17_intro/headers.cc b/gnu/lib/libstdc++/libstdc++/testsuite/17_intro/headers.cc index 4694079ed29..789c8435cb6 100644 --- a/gnu/lib/libstdc++/libstdc++/testsuite/17_intro/headers.cc +++ b/gnu/lib/libstdc++/libstdc++/testsuite/17_intro/headers.cc @@ -78,7 +78,7 @@ // "C" headers that might not work if wchar_t support is disabled. #include <bits/c++config.h> -#if _GLIBCPP_USE_WCHAR_T +#if defined(_GLIBCPP_USE_WCHAR_T) #include <cwchar> #include <cwctype> #endif diff --git a/gnu/lib/libstdc++/libstdc++/testsuite/17_intro/headers_c++.cc b/gnu/lib/libstdc++/libstdc++/testsuite/17_intro/headers_c++.cc index cb6a71d9e13..f7eb8254b61 100644 --- a/gnu/lib/libstdc++/libstdc++/testsuite/17_intro/headers_c++.cc +++ b/gnu/lib/libstdc++/libstdc++/testsuite/17_intro/headers_c++.cc @@ -60,7 +60,7 @@ // "C++" headers that might not work if wchar_t support is disabled. #include <bits/c++config.h> -#if _GLIBCPP_USE_WCHAR_T +#if defined(_GLIBCPP_USE_WCHAR_T) #include <cwchar> #include <cwctype> #include <wchar.h> diff --git a/gnu/lib/libstdc++/libstdc++/testsuite/17_intro/headers_c.cc b/gnu/lib/libstdc++/libstdc++/testsuite/17_intro/headers_c.cc index b4fe65895d9..37273a23bcc 100644 --- a/gnu/lib/libstdc++/libstdc++/testsuite/17_intro/headers_c.cc +++ b/gnu/lib/libstdc++/libstdc++/testsuite/17_intro/headers_c.cc @@ -60,7 +60,7 @@ // "C" headers that might not work if wchar_t support is disabled. #include <bits/c++config.h> -#if _GLIBCPP_USE_WCHAR_T +#if defined(_GLIBCPP_USE_WCHAR_T) #include <wchar.h> #include <wctype.h> #include <cwchar> diff --git a/gnu/lib/libstdc++/libstdc++/testsuite/18_support/numeric_limits.cc b/gnu/lib/libstdc++/libstdc++/testsuite/18_support/numeric_limits.cc index 540b4b7759f..47fc26b9991 100644 --- a/gnu/lib/libstdc++/libstdc++/testsuite/18_support/numeric_limits.cc +++ b/gnu/lib/libstdc++/libstdc++/testsuite/18_support/numeric_limits.cc @@ -49,7 +49,7 @@ DEFINE_EXTREMA(unsigned, 0U, UINT_MAX); DEFINE_EXTREMA(long, LONG_MIN, LONG_MAX); DEFINE_EXTREMA(unsigned long, 0UL, ULONG_MAX); -#if _GLIBCPP_USE_WCHAR_T +#if defined(_GLIBCPP_USE_WCHAR_T) DEFINE_EXTREMA(wchar_t, WCHAR_MIN, WCHAR_MAX); #endif //_GLIBCPP_USE_WCHAR_T diff --git a/gnu/lib/libstdc++/libstdc++/testsuite/21_strings/char_traits_requirements.cc b/gnu/lib/libstdc++/libstdc++/testsuite/21_strings/char_traits_requirements.cc index d2406ed3599..e14fff64836 100644 --- a/gnu/lib/libstdc++/libstdc++/testsuite/21_strings/char_traits_requirements.cc +++ b/gnu/lib/libstdc++/libstdc++/testsuite/21_strings/char_traits_requirements.cc @@ -107,7 +107,7 @@ int test01(void) return test; } -#if _GLIBCPP_USE_WCHAR_T +#if defined(_GLIBCPP_USE_WCHAR_T) int test02(void) { bool test = true; @@ -197,7 +197,7 @@ int test02(void) int main() { test01(); -#if _GLIBCPP_USE_WCHAR_T +#if defined(_GLIBCPP_USE_WCHAR_T) test02(); #endif return 0; diff --git a/gnu/lib/libstdc++/libstdc++/testsuite/22_locale/codecvt_members_unicode_char.cc b/gnu/lib/libstdc++/libstdc++/testsuite/22_locale/codecvt_members_unicode_char.cc index 51bf9b9600a..950333aa361 100644 --- a/gnu/lib/libstdc++/libstdc++/testsuite/22_locale/codecvt_members_unicode_char.cc +++ b/gnu/lib/libstdc++/libstdc++/testsuite/22_locale/codecvt_members_unicode_char.cc @@ -294,7 +294,7 @@ void test02() int main () { -#if _GLIBCPP_USE___ENC_TRAITS +#if defined(_GLIBCPP_USE___ENC_TRAITS) test01(); test02(); #endif diff --git a/gnu/lib/libstdc++/libstdc++/testsuite/22_locale/codecvt_members_wchar_t_char.cc b/gnu/lib/libstdc++/libstdc++/testsuite/22_locale/codecvt_members_wchar_t_char.cc index 1eb505fb6bd..341802fef69 100644 --- a/gnu/lib/libstdc++/libstdc++/testsuite/22_locale/codecvt_members_wchar_t_char.cc +++ b/gnu/lib/libstdc++/libstdc++/testsuite/22_locale/codecvt_members_wchar_t_char.cc @@ -148,7 +148,7 @@ void test03() int main () { -#if _GLIBCPP_USE_WCHAR_T +#if defined(_GLIBCPP_USE_WCHAR_T) test01(); test02(); test03(); diff --git a/gnu/lib/libstdc++/libstdc++/testsuite/22_locale/collate_members_wchar_t.cc b/gnu/lib/libstdc++/libstdc++/testsuite/22_locale/collate_members_wchar_t.cc index c59ab329ebd..5fedafd52c1 100644 --- a/gnu/lib/libstdc++/libstdc++/testsuite/22_locale/collate_members_wchar_t.cc +++ b/gnu/lib/libstdc++/libstdc++/testsuite/22_locale/collate_members_wchar_t.cc @@ -180,7 +180,7 @@ void test04() int main() { -#if _GLIBCPP_USE_WCHAR_T +#if defined(_GLIBCPP_USE_WCHAR_T) test01(); test02(); test03(); diff --git a/gnu/lib/libstdc++/libstdc++/testsuite/22_locale/ctor_copy_dtor.cc b/gnu/lib/libstdc++/libstdc++/testsuite/22_locale/ctor_copy_dtor.cc index 2b26f4a0dab..b754cc192c6 100644 --- a/gnu/lib/libstdc++/libstdc++/testsuite/22_locale/ctor_copy_dtor.cc +++ b/gnu/lib/libstdc++/libstdc++/testsuite/22_locale/ctor_copy_dtor.cc @@ -32,7 +32,7 @@ void test00() std::locale loc("C"); } -#if _GLIBCPP_USE___ENC_TRAITS +#if defined(_GLIBCPP_USE___ENC_TRAITS) typedef std::codecvt<char, char, std::mbstate_t> c_codecvt; typedef std::codecvt_byname<char, char, std::mbstate_t> c_codecvt_byname; typedef std::codecvt<wchar_t, char, std::mbstate_t> w_codecvt; @@ -496,7 +496,7 @@ int main() { test00(); -#if _GLIBCPP_USE___ENC_TRAITS +#if defined(_GLIBCPP_USE___ENC_TRAITS) test01(); #endif diff --git a/gnu/lib/libstdc++/libstdc++/testsuite/22_locale/ctype_members_wchar_t.cc b/gnu/lib/libstdc++/libstdc++/testsuite/22_locale/ctype_members_wchar_t.cc index 31b1bcbf160..91ee4dea9ac 100644 --- a/gnu/lib/libstdc++/libstdc++/testsuite/22_locale/ctype_members_wchar_t.cc +++ b/gnu/lib/libstdc++/libstdc++/testsuite/22_locale/ctype_members_wchar_t.cc @@ -32,7 +32,7 @@ #include <locale> #include <testsuite_hooks.h> -#if _GLIBCPP_USE_WCHAR_T +#if defined(_GLIBCPP_USE_WCHAR_T) void test01() { // Nothing, right now. @@ -41,7 +41,7 @@ void test01() int main() { -#if _GLIBCPP_USE_WCHAR_T +#if defined(_GLIBCPP_USE_WCHAR_T) test01(); #endif diff --git a/gnu/lib/libstdc++/libstdc++/testsuite/26_numerics/c99_classification_macros_c++.cc b/gnu/lib/libstdc++/libstdc++/testsuite/26_numerics/c99_classification_macros_c++.cc index 132cebf5ab7..0b149f38955 100644 --- a/gnu/lib/libstdc++/libstdc++/testsuite/26_numerics/c99_classification_macros_c++.cc +++ b/gnu/lib/libstdc++/libstdc++/testsuite/26_numerics/c99_classification_macros_c++.cc @@ -55,7 +55,7 @@ void islessgreater() { } void isunordered() { } -#if _GLIBCPP_USE_C99 +#if defined(_GLIBCPP_USE_C99) template <typename _Tp> void test_c99_classify() { @@ -83,7 +83,7 @@ template <typename _Tp> int main() { -#if _GLIBCPP_USE_C99 +#if defined(_GLIBCPP_USE_C99) test_c99_classify<float>(); //test_c99_classify<double>(); #endif diff --git a/gnu/lib/libstdc++/libstdc++/testsuite/27_io/ostream_inserter_arith.cc b/gnu/lib/libstdc++/libstdc++/testsuite/27_io/ostream_inserter_arith.cc index f4e58436842..7d6935e8a1c 100644 --- a/gnu/lib/libstdc++/libstdc++/testsuite/27_io/ostream_inserter_arith.cc +++ b/gnu/lib/libstdc++/libstdc++/testsuite/27_io/ostream_inserter_arith.cc @@ -54,7 +54,7 @@ struct _TestCase bool right; const char* result; -#if _GLIBCPP_USE_WCHAR_T +#if defined(_GLIBCPP_USE_WCHAR_T) const wchar_t* wresult; #endif }; @@ -64,7 +64,7 @@ static bool F=false; static _TestCase testcases[] = { -#if _GLIBCPP_USE_WCHAR_T +#if defined(_GLIBCPP_USE_WCHAR_T) // standard output (no formatting applied) 1-4 { 1.2, 6,0,'.',' ', F,F,F,F,F,F,F,F, "1.2",L"1.2" }, { 54, 6,0,'.',' ', F,F,F,F,F,F,F,F, "54",L"54" }, @@ -226,7 +226,7 @@ test01() #endif VERIFY( os && os.str() == tc.result ); } -#if _GLIBCPP_USE_WCHAR_T +#if defined(_GLIBCPP_USE_WCHAR_T) // test double with wchar_t type { testpunct<wchar_t>* __tp = new testpunct<wchar_t>(tc.decimal); diff --git a/gnu/lib/libstdc++/libstdc++/testsuite/27_io/ostream_inserter_char.cc b/gnu/lib/libstdc++/libstdc++/testsuite/27_io/ostream_inserter_char.cc index 2fe88f5815b..77322524b4c 100644 --- a/gnu/lib/libstdc++/libstdc++/testsuite/27_io/ostream_inserter_char.cc +++ b/gnu/lib/libstdc++/libstdc++/testsuite/27_io/ostream_inserter_char.cc @@ -253,7 +253,7 @@ protected: // [lib.ostream.inserters.character] void test07() { -#if _GLIBCPP_USE_WCHAR_T +#if defined(_GLIBCPP_USE_WCHAR_T) using namespace std; bool test = true; @@ -304,7 +304,7 @@ void test08() oss << ""; VERIFY( oss.good() ); -#if _GLIBCPP_USE_WCHAR_T +#if defined(_GLIBCPP_USE_WCHAR_T) // 2 std::wostringstream woss; woss << pt; diff --git a/gnu/lib/libstdc++/libstdc++/testsuite/27_io/wide_stream_objects.cc b/gnu/lib/libstdc++/libstdc++/testsuite/27_io/wide_stream_objects.cc index 022f6eff327..ec5c15529d1 100644 --- a/gnu/lib/libstdc++/libstdc++/testsuite/27_io/wide_stream_objects.cc +++ b/gnu/lib/libstdc++/libstdc++/testsuite/27_io/wide_stream_objects.cc @@ -66,7 +66,7 @@ #include <cstdlib> #include <cstring> #include <ctime> -#if _GLIBCPP_USE_WCHAR_T +#if defined(_GLIBCPP_USE_WCHAR_T) #include <bits/c++config.h> #include <cwchar> #include <cwctype> |