From 3ad249b9c71911ab735f7ea4e43a0b3fa6f48513 Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Mon, 14 Jul 2003 13:32:26 +0000 Subject: [PATCH] Include and . From-SVN: r69329 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/config/locale/gnu/c_locale.h | 16 +++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 093758c937e7..78d4852d2abe 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2003-07-14 Gabriel Dos Reis + + * config/locale/gnu/c_locale.h (__convert_from_v): Include + and . Qualify names. + 2003-07-13 Mark Mitchell * config/locale/generic/c_locale.h: Include and diff --git a/libstdc++-v3/config/locale/gnu/c_locale.h b/libstdc++-v3/config/locale/gnu/c_locale.h index 6bc4c39577e3..5ead068ea04a 100644 --- a/libstdc++-v3/config/locale/gnu/c_locale.h +++ b/libstdc++-v3/config/locale/gnu/c_locale.h @@ -38,6 +38,8 @@ #pragma GCC system_header +#include // get std::strlen +#include // get std::malloc #include #include // For codecvt #include // For codecvt using iconv, iconv_t @@ -73,10 +75,10 @@ namespace std _Tv __v, const __c_locale&, int __prec = -1) { char* __old = setlocale(LC_ALL, NULL); - char* __sav = static_cast(malloc(strlen(__old) + 1)); + char* __sav = static_cast(std::malloc(std::strlen(__old) + 1)); if (__sav) - strcpy(__sav, __old); - setlocale(LC_ALL, "C"); + std::strcpy(__sav, __old); + std::setlocale(LC_ALL, "C"); #endif int __ret; @@ -87,16 +89,16 @@ namespace std __ret = snprintf(__out, __size, __fmt, __v); #else if (__prec >= 0) - __ret = sprintf(__out, __fmt, __prec, __v); + __ret = std::sprintf(__out, __fmt, __prec, __v); else - __ret = sprintf(__out, __fmt, __v); + __ret = std::sprintf(__out, __fmt, __v); #endif #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) __gnu_cxx::__uselocale(__old); #else - setlocale(LC_ALL, __sav); - free(__sav); + std::setlocale(LC_ALL, __sav); + std::free(__sav); #endif return __ret; } -- 2.47.3