* 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
+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
// 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.
#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)
_GLIBCXX_BEGIN_NAMESPACE(std)
- using ::wint_t; // cwchar
-
- using ::wctype_t;
using ::wctrans_t;
+ using ::wctype_t;
+ using ::wint_t;
using ::iswalnum;
using ::iswalpha;
// 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
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;
// __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()
// -*- 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
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
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 "
// 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
// 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;
// -*- 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
: _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()
// 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);
}