OSDN Git Service

2007-04-10 Benjamin Kosnik <bkoz@redhat.com>
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 Apr 2007 01:11:56 +0000 (01:11 +0000)
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 Apr 2007 01:11:56 +0000 (01:11 +0000)
* include/ext/pb_ds/detail/resize_policy/
cc_hash_max_collision_check_resize_trigger_imp.hpp: Qualify
namespace std members.
* include/ext/pb_ds/detail/list_update_policy/
counter_lu_metadata.hpp: Same.
* include/ext/throw_allocator.h: Same.
* include/ext/pod_char_traits.h: Same.
* include/ext/malloc_allocator.h: Same.
* libsupc++/del_op.cc: Same, simplify.

* include/bits/c++config: Adjust macro name.

* include/c_global/cstring: Alphabetize.
* include/c_global/cwctype: Same.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123710 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/c++config
libstdc++-v3/include/c_global/cstring
libstdc++-v3/include/c_global/cwctype
libstdc++-v3/include/ext/malloc_allocator.h
libstdc++-v3/include/ext/pb_ds/detail/list_update_policy/counter_lu_metadata.hpp
libstdc++-v3/include/ext/pb_ds/detail/resize_policy/cc_hash_max_collision_check_resize_trigger_imp.hpp
libstdc++-v3/include/ext/pod_char_traits.h
libstdc++-v3/include/ext/throw_allocator.h
libstdc++-v3/libsupc++/del_op.cc

index 7df035d..68f0447 100644 (file)
@@ -1,3 +1,20 @@
+2007-04-10  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * include/ext/pb_ds/detail/resize_policy/
+       cc_hash_max_collision_check_resize_trigger_imp.hpp: Qualify
+       namespace std members.  
+       * include/ext/pb_ds/detail/list_update_policy/
+       counter_lu_metadata.hpp: Same.
+       * include/ext/throw_allocator.h: Same.
+       * include/ext/pod_char_traits.h: Same.
+       * include/ext/malloc_allocator.h: Same.
+       * libsupc++/del_op.cc: Same, simplify.
+
+       * include/bits/c++config: Adjust macro name.
+       
+       * include/c_global/cstring: Alphabetize.
+       * include/c_global/cwctype: Same.
+       
 2007-04-10  Paolo Carlini  <pcarlini@suse.de>
 
        * include/tr1/cmath: Include <bits/stl_algobase.h> instead of
index b11d27a..f4e951c 100644 (file)
@@ -51,7 +51,7 @@
 // includes that inject C90/C99 names into the global namespace.
 // XXX May not be necessary
 #if __cplusplus == 199711L
-# define _GLIBCXX_NAMESPACE_C 1
+# define _GLIBCXX_NAMESPACE_GLOBAL_INJECTION 1
 #endif
 
 // Macros for visibility.
index c797aca..c41df69 100644 (file)
 #define _GLIBCXX_CSTRING 1
 
 // Get rid of those macros defined in <string.h> in lieu of real functions.
+#undef memchr
+#undef memcmp
 #undef memcpy
 #undef memmove
-#undef strcpy
-#undef strncpy
+#undef memset
 #undef strcat
-#undef strncat
-#undef memcmp
+#undef strchr
 #undef strcmp
 #undef strcoll
-#undef strncmp
-#undef strxfrm
-#undef memchr
-#undef strchr
+#undef strcpy
 #undef strcspn
+#undef strerror
+#undef strlen
+#undef strncat
+#undef strncmp
+#undef strncpy
 #undef strpbrk
 #undef strrchr
 #undef strspn
 #undef strstr
 #undef strtok
-#undef memset
-#undef strerror
-#undef strlen
+#undef strxfrm
 
 _GLIBCXX_BEGIN_NAMESPACE(std)
 
+  using ::memchr;
+  using ::memcmp;
   using ::memcpy;
   using ::memmove;
-  using ::strcpy;
-  using ::strncpy;
+  using ::memset;
   using ::strcat;
-  using ::strncat;
-  using ::memcmp;
   using ::strcmp;
   using ::strcoll;
-  using ::strncmp;
-  using ::strxfrm;
+  using ::strcpy;
   using ::strcspn;
-  using ::strspn;
-  using ::strtok;
-  using ::memset;
   using ::strerror;
   using ::strlen;
-
-  using ::memchr;
+  using ::strncat;
+  using ::strncmp;
+  using ::strncpy;
+  using ::strspn;
+  using ::strtok;
+  using ::strxfrm;
 
   inline void*
   memchr(void* __p, int __c, size_t __n)
index ab97b8d..5c8d598 100644 (file)
 
 _GLIBCXX_BEGIN_NAMESPACE(std)
 
-  using ::wint_t;        // cwchar
-
-  using ::wctype_t;
   using ::wctrans_t;
+  using ::wctype_t;
+  using ::wint_t;
 
   using ::iswalnum;
   using ::iswalpha;
index 0f23e06..531045b 100644 (file)
@@ -1,6 +1,7 @@
 // Allocator that wraps "C" malloc -*- C++ -*-
 
-// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007
+// Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -89,7 +90,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
        if (__builtin_expect(__n > this->max_size(), false))
          std::__throw_bad_alloc();
 
-       pointer __ret = static_cast<_Tp*>(malloc(__n * sizeof(_Tp)));
+       pointer __ret = static_cast<_Tp*>(std::malloc(__n * sizeof(_Tp)));
        if (!__ret)
          std::__throw_bad_alloc();
        return __ret;
@@ -98,7 +99,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
       // __p is not permitted to be a null pointer.
       void
       deallocate(pointer __p, size_type)
-      { free(static_cast<void*>(__p)); }
+      { std::free(static_cast<void*>(__p)); }
 
       size_type
       max_size() const throw() 
index d8cd289..e02c6fb 100644 (file)
@@ -1,6 +1,6 @@
 // -*- C++ -*-
 
-// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the terms
@@ -76,7 +76,7 @@ namespace pb_ds
 
       counter_lu_metadata<size_type>
       operator()(size_type max_size) const
-      { return counter_lu_metadata<Size_Type>(rand() % max_size); }
+      { return counter_lu_metadata<Size_Type>(std::rand() % max_size); }
 
       template<typename Metadata_Reference>
       bool
index 3ade0c7..fa3a056 100644 (file)
@@ -161,8 +161,8 @@ PB_DS_CLASS_C_DEC::
 calc_max_num_coll()
 {
   // max_col <-- \sqrt{2 load \ln( 2 m \ln( m ) ) }
-  const double ln_arg = 2 * m_size * ::log(double(m_size));
-  m_max_col = size_type(::ceil(::sqrt(2 * m_load * ::log(ln_arg))));
+  const double ln_arg = 2 * m_size * std::log(double(m_size));
+  m_max_col = size_type(std::ceil(std::sqrt(2 * m_load * std::log(ln_arg))));
 
 #ifdef PB_DS_HT_MAP_RESIZE_TRACE_
   std::cerr << "chmccrt::calc_max_num_coll " 
index 236e349..ab3d99e 100644 (file)
@@ -1,6 +1,6 @@
 // POD character, std::char_traits specialization -*- C++ -*-
 
-// Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -46,7 +46,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
   // int_type to properly hold the full range of char_type values as
   // well as EOF.
   /// @brief A POD class that serves as a character abstraction class.
-  template<typename V, typename I, typename S = mbstate_t>
+  template<typename V, typename I, typename S = std::mbstate_t>
     struct character
     {
       typedef V                                value_type;
index 112fb73..869aa42 100644 (file)
@@ -1,6 +1,6 @@
 // -*- C++ -*-
 
-// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the terms
@@ -109,7 +109,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
       : _M_throw_prob_orig(_S_throw_prob)
       {
        _S_throw_prob =
-         1 - ::pow(double(1 - _S_throw_prob), double(0.5 / (size + 1)));
+         1 - std::pow(double(1 - _S_throw_prob), double(0.5 / (size + 1)));
       }
 
       ~group_throw_prob_adjustor()
index 93f4aa8..e4bbffa 100644 (file)
@@ -1,6 +1,6 @@
 // Boilerplate support routines for -*- C++ -*- dynamic memory management.
 
-// Copyright (C) 1997, 1998, 1999, 2000, 2004 Free Software Foundation
+// Copyright (C) 1997, 1998, 1999, 2000, 2004, 2007 Free Software Foundation
 //
 // This file is part of GCC.
 //
 // the GNU General Public License.
 
 #include <bits/c++config.h>
-#include "new"
-#if _GLIBCXX_HOSTED
-#include <cstdlib>
-#endif
 
-#if _GLIBCXX_HOSTED
-using std::free;
-#else
+#if !_GLIBCXX_HOSTED
 // A freestanding C runtime may not provide "free" -- but there is no
 // other reasonable way to implement "operator delete".
-extern "C" void free(void *);
+_GLIBCXX_BEGIN_NAMESPACE(std)
+  extern "C" void free(void*);
+_GLIBCXX_END_NAMESPACE
+#else
+# include <cstdlib>
 #endif
 
+#include "new"
+
 _GLIBCXX_WEAK_DEFINITION void
-operator delete (void *ptr) throw ()
+operator delete(void* ptr) throw ()
 {
   if (ptr)
-    free (ptr);
+    std::free(ptr);
 }