This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
2007-05-21 Paolo Carlini <pcarlini@suse.de> * config/locale/gnu/c_locale.h: Do not include <cstdarg>, use builtins. * config/locale/generic/c_locale.h: Likewise.
Index: config/locale/gnu/c_locale.h =================================================================== --- config/locale/gnu/c_locale.h (revision 124895) +++ config/locale/gnu/c_locale.h (working copy) @@ -45,7 +45,6 @@ #pragma GCC system_header #include <clocale> -#include <cstdarg> #include <cstddef> #define _GLIBCXX_C_LOCALE_GNU 1 @@ -84,8 +83,8 @@ 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 @@ 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); Index: config/locale/generic/c_locale.h =================================================================== --- config/locale/generic/c_locale.h (revision 124895) +++ config/locale/generic/c_locale.h (working copy) @@ -45,7 +45,6 @@ #pragma GCC system_header #include <clocale> -#include <cstdarg> #include <cstddef> #define _GLIBCXX_NUM_CATEGORIES 0 @@ -73,8 +72,8 @@ 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 @@ const int __ret = __builtin_vsprintf(__out, __fmt, __args); #endif - va_end(__args); - + __builtin_va_end(__args); + if (__sav) { std::setlocale(LC_NUMERIC, __sav);
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |