diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 322e2b528f6f..2c2ff95d28fd 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2007-05-21 Paolo Carlini + + * config/locale/gnu/c_locale.h: Do not include , use builtins. + * config/locale/generic/c_locale.h: Likewise. + 2007-05-21 Paolo Carlini PR libstdc++/31621 diff --git a/libstdc++-v3/config/locale/generic/c_locale.h b/libstdc++-v3/config/locale/generic/c_locale.h index ac5ce772fada..42ec7b00b8ae 100644 --- a/libstdc++-v3/config/locale/generic/c_locale.h +++ b/libstdc++-v3/config/locale/generic/c_locale.h @@ -45,7 +45,6 @@ #pragma GCC system_header #include -#include #include #define _GLIBCXX_NUM_CATEGORIES 0 @@ -73,8 +72,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) std::setlocale(LC_NUMERIC, "C"); } - va_list __args; - va_start(__args, __fmt); + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); #ifdef _GLIBCXX_USE_C99 const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); @@ -82,8 +81,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) const int __ret = __builtin_vsprintf(__out, __fmt, __args); #endif - va_end(__args); - + __builtin_va_end(__args); + if (__sav) { std::setlocale(LC_NUMERIC, __sav); diff --git a/libstdc++-v3/config/locale/gnu/c_locale.h b/libstdc++-v3/config/locale/gnu/c_locale.h index fae7ffec59ac..33a2c07d8ac1 100644 --- a/libstdc++-v3/config/locale/gnu/c_locale.h +++ b/libstdc++-v3/config/locale/gnu/c_locale.h @@ -45,7 +45,6 @@ #pragma GCC system_header #include -#include #include #define _GLIBCXX_C_LOCALE_GNU 1 @@ -84,8 +83,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) std::setlocale(LC_ALL, "C"); #endif - va_list __args; - va_start(__args, __fmt); + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); #ifdef _GLIBCXX_USE_C99 const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); @@ -93,7 +92,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) const int __ret = __builtin_vsprintf(__out, __fmt, __args); #endif - va_end(__args); + __builtin_va_end(__args); #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) __gnu_cxx::__uselocale(__old);