diff options
author | Paolo Carlini <pcarlini@unitus.it> | 2003-07-14 22:14:49 +0200 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2003-07-14 20:14:49 +0000 |
commit | f088510d96142e9afaac98016660b46c3f1d50c9 (patch) | |
tree | eaf4fc3a69661d2c76adb985910e0d740b4622fe | |
parent | 373f8df79edce496b9d64294dfbb2504f930411b (diff) | |
download | gcc-f088510d96142e9afaac98016660b46c3f1d50c9.zip gcc-f088510d96142e9afaac98016660b46c3f1d50c9.tar.gz gcc-f088510d96142e9afaac98016660b46c3f1d50c9.tar.bz2 |
stl_tempbuf.h: Qualify free with std::.
2003-07-14 Paolo Carlini <pcarlini@unitus.it>
* include/bits/stl_tempbuf.h: Qualify free with std::.
* src/locale.cc: Include <cstdlib>, qualify getenv.
From-SVN: r69347
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_tempbuf.h | 4 | ||||
-rw-r--r-- | libstdc++-v3/src/locale.cc | 13 |
3 files changed, 14 insertions, 8 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 33dc3df..d3d7037 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,10 @@ 2003-07-14 Paolo Carlini <pcarlini@unitus.it> + * include/bits/stl_tempbuf.h: Qualify free with std::. + * src/locale.cc: Include <cstdlib>, qualify getenv. + +2003-07-14 Paolo Carlini <pcarlini@unitus.it> + * config/locale/gnu/c_locale.h (__convert_from_v): Include <cstdio>. Qualify names. * config/locale/generic/c_locale.h (__convert_from_v): Ditto. diff --git a/libstdc++-v3/include/bits/stl_tempbuf.h b/libstdc++-v3/include/bits/stl_tempbuf.h index 1fa5afc..0526c0d 100644 --- a/libstdc++-v3/include/bits/stl_tempbuf.h +++ b/libstdc++-v3/include/bits/stl_tempbuf.h @@ -125,7 +125,7 @@ public: } catch(...) { - free(_M_buffer); + std::free(_M_buffer); _M_buffer = 0; _M_len = 0; __throw_exception_again; @@ -134,7 +134,7 @@ public: ~_Temporary_buffer() { std::_Destroy(_M_buffer, _M_buffer + _M_len); - free(_M_buffer); + std::free(_M_buffer); } private: diff --git a/libstdc++-v3/src/locale.cc b/libstdc++-v3/src/locale.cc index 43f831d..514c62a 100644 --- a/libstdc++-v3/src/locale.cc +++ b/libstdc++-v3/src/locale.cc @@ -28,6 +28,7 @@ #include <clocale> #include <cstring> +#include <cstdlib> // For getenv, free. #include <cctype> #include <cwctype> // For towupper, etc. #include <locale> @@ -183,7 +184,7 @@ namespace std else { // Get it from the environment. - char* __env = getenv("LC_ALL"); + char* __env = std::getenv("LC_ALL"); // If LC_ALL is set we are done. if (__env && std::strcmp(__env, "") != 0) { @@ -197,7 +198,7 @@ namespace std { char* __res; // LANG may set a default different from "C". - char* __env = getenv("LANG"); + char* __env = std::getenv("LANG"); if (!__env || std::strcmp(__env, "") == 0 || std::strcmp(__env, "C") == 0 || std::strcmp(__env, "POSIX") == 0) @@ -211,7 +212,7 @@ namespace std if (std::strcmp(__res, "C") == 0) for (; __i < _S_categories_size; ++__i) { - __env = getenv(_S_categories[__i]); + __env = std::getenv(_S_categories[__i]); if (__env && std::strcmp(__env, "") != 0 && std::strcmp(__env, "C") != 0 && std::strcmp(__env, "POSIX") != 0) @@ -220,7 +221,7 @@ namespace std else for (; __i < _S_categories_size; ++__i) { - __env = getenv(_S_categories[__i]); + __env = std::getenv(_S_categories[__i]); if (__env && std::strcmp(__env, "") != 0 && std::strcmp(__env, __res) != 0) break; @@ -245,7 +246,7 @@ namespace std __i++; for (; __i < _S_categories_size; ++__i) { - __env = getenv(_S_categories[__i]); + __env = std::getenv(_S_categories[__i]); if (!__env || std::strcmp(__env, "") == 0) { __str += _S_categories[__i]; @@ -276,7 +277,7 @@ namespace std (_M_impl = _S_classic)->_M_add_reference(); else _M_impl = new _Impl(__res, 1); - free(__res); + std::free(__res); } } } |