diff options
author | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-04-11 01:11:56 +0000 |
---|---|---|
committer | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-04-11 01:11:56 +0000 |
commit | c90e3f918b49b3836568a7c155f20ffee93174dd (patch) | |
tree | 5d9d229c2cc4878453751b14c926f66621ec5898 | |
parent | 3e6bc865e88020ba2650605936bff3dd57947f99 (diff) | |
download | ppe42-gcc-c90e3f918b49b3836568a7c155f20ffee93174dd.tar.gz ppe42-gcc-c90e3f918b49b3836568a7c155f20ffee93174dd.zip |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123710 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libstdc++-v3/ChangeLog | 17 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/c++config | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/c_global/cstring | 43 | ||||
-rw-r--r-- | libstdc++-v3/include/c_global/cwctype | 5 | ||||
-rw-r--r-- | libstdc++-v3/include/ext/malloc_allocator.h | 7 | ||||
-rw-r--r-- | libstdc++-v3/include/ext/pb_ds/detail/list_update_policy/counter_lu_metadata.hpp | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/ext/pb_ds/detail/resize_policy/cc_hash_max_collision_check_resize_trigger_imp.hpp | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/ext/pod_char_traits.h | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/ext/throw_allocator.h | 4 | ||||
-rw-r--r-- | libstdc++-v3/libsupc++/del_op.cc | 22 |
10 files changed, 64 insertions, 48 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 7df035d03d0..68f0447bb71 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -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 diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index b11d27a1640..f4e951c50ab 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -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. diff --git a/libstdc++-v3/include/c_global/cstring b/libstdc++-v3/include/c_global/cstring index c797aca16b4..c41df692cdf 100644 --- a/libstdc++-v3/include/c_global/cstring +++ b/libstdc++-v3/include/c_global/cstring @@ -52,50 +52,49 @@ #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) diff --git a/libstdc++-v3/include/c_global/cwctype b/libstdc++-v3/include/c_global/cwctype index ab97b8dc9b5..5c8d59846b3 100644 --- a/libstdc++-v3/include/c_global/cwctype +++ b/libstdc++-v3/include/c_global/cwctype @@ -79,10 +79,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) - using ::wint_t; // cwchar - - using ::wctype_t; using ::wctrans_t; + using ::wctype_t; + using ::wint_t; using ::iswalnum; using ::iswalpha; diff --git a/libstdc++-v3/include/ext/malloc_allocator.h b/libstdc++-v3/include/ext/malloc_allocator.h index 0f23e06c8e8..531045b6325 100644 --- a/libstdc++-v3/include/ext/malloc_allocator.h +++ b/libstdc++-v3/include/ext/malloc_allocator.h @@ -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() diff --git a/libstdc++-v3/include/ext/pb_ds/detail/list_update_policy/counter_lu_metadata.hpp b/libstdc++-v3/include/ext/pb_ds/detail/list_update_policy/counter_lu_metadata.hpp index d8cd2891683..e02c6fbfe49 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/list_update_policy/counter_lu_metadata.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/list_update_policy/counter_lu_metadata.hpp @@ -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 diff --git a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/cc_hash_max_collision_check_resize_trigger_imp.hpp b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/cc_hash_max_collision_check_resize_trigger_imp.hpp index 3ade0c7e16c..fa3a056f1fc 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/cc_hash_max_collision_check_resize_trigger_imp.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/cc_hash_max_collision_check_resize_trigger_imp.hpp @@ -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 " diff --git a/libstdc++-v3/include/ext/pod_char_traits.h b/libstdc++-v3/include/ext/pod_char_traits.h index 236e349cd44..ab3d99e12ef 100644 --- a/libstdc++-v3/include/ext/pod_char_traits.h +++ b/libstdc++-v3/include/ext/pod_char_traits.h @@ -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; diff --git a/libstdc++-v3/include/ext/throw_allocator.h b/libstdc++-v3/include/ext/throw_allocator.h index 112fb739d70..869aa4245ec 100644 --- a/libstdc++-v3/include/ext/throw_allocator.h +++ b/libstdc++-v3/include/ext/throw_allocator.h @@ -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() diff --git a/libstdc++-v3/libsupc++/del_op.cc b/libstdc++-v3/libsupc++/del_op.cc index 93f4aa8373c..e4bbffaba30 100644 --- a/libstdc++-v3/libsupc++/del_op.cc +++ b/libstdc++-v3/libsupc++/del_op.cc @@ -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. // @@ -29,22 +29,22 @@ // 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); } |