Commit 885d02aa authored by paolo's avatar paolo
Browse files

2003-07-14 Paolo Carlini <pcarlini@unitus.it>

	* include/bits/stl_tempbuf.h: Qualify free with std::.
	* src/locale.cc: Include <cstdlib>, qualify getenv.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69347 138bc75d-0d04-0410-961f-82ee72b054a4
parent c56b171d
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
......
......@@ -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:
......
......@@ -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);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment