OSDN Git Service

2003-07-14 Paolo Carlini <pcarlini@unitus.it>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Jul 2003 20:14:49 +0000 (20:14 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Jul 2003 20:14:49 +0000 (20:14 +0000)
* 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

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_tempbuf.h
libstdc++-v3/src/locale.cc

index 33dc3df..d3d7037 100644 (file)
@@ -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.
index 1fa5afc..0526c0d 100644 (file)
@@ -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:
index 43f831d..514c62a 100644 (file)
@@ -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);
              }
          }
       }