+2006-09-12 Benjamin Kosnik <bkoz@redhat.com>
+
+ * libsupc++/eh_globals.cc: Remove __gnu_internal.
+ * config/io/basic_file_stdio.cc: Same.
+ * config/abi/compatibility.h: Same.
+ * config/cpu/generic/atomicity_mutex/atomicity.h: Same.
+ * config/cpu/sh/atomicity.h: Same.
+
2006-09-10 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_heap.h (sort_heap): Iterator post-decrement is
// Compatibility symbols for previous versions -*- C++ -*-
-// Copyright (C) 2005
+// Copyright (C) 2005, 2006
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
_ZNSt19istreambuf_iteratorIcSt11char_traitsIcEEppEv
_ZNSt19istreambuf_iteratorIwSt11char_traitsIwEEppEv
*/
-namespace __gnu_internal
+namespace
{
_GLIBCXX_APPLY_SYMVER(_ZNSt21istreambuf_iteratorXXIcSt11char_traitsIcEEppEv,
_ZNSt19istreambuf_iteratorIcSt11char_traitsIcEEppEv)
_GLIBCXX_APPLY_SYMVER(_ZNSt21istreambuf_iteratorXXIwSt11char_traitsIwEEppEv,
_ZNSt19istreambuf_iteratorIwSt11char_traitsIwEEppEv)
#endif
-} // namespace std
+} // anonymous namespace
/* gcc-4.0.0
_ZNSs4_Rep26_M_set_length_and_sharableEj
_ZNSt11char_traitsIcE2eqERKcS2_
_ZNSt11char_traitsIwE2eqERKwS2_
*/
-namespace __gnu_internal
+namespace
{
_GLIBCXX_APPLY_SYMVER(_ZNSt11char_traitsIcE4eqXXERKcS2_,
_ZNSt11char_traitsIcE2eqERKcS2_)
_GLIBCXX_APPLY_SYMVER(_ZNKSt16basic_ofstreamXXIwSt11char_traitsIwEE7is_openEv,
_ZNKSt14basic_ofstreamIwSt11char_traitsIwEE7is_openEv)
#endif
-}
+ } // anonymous namespace
// Low-level functions for atomic operations: Generic version -*- C++ -*-
-// Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005
+// Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
#include <bits/atomicity.h>
#include <bits/concurrence.h>
-namespace __gnu_internal
+namespace
{
__glibcxx_mutex_define_initialized(atomic_mutex);
-} // namespace __gnu_internal
+} // anonymous namespace
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
__attribute__ ((__unused__))
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
{
- __glibcxx_mutex_lock(__gnu_internal::atomic_mutex);
+ __glibcxx_mutex_lock(atomic_mutex);
_Atomic_word __result;
__result = *__mem;
*__mem += __val;
- __glibcxx_mutex_unlock(__gnu_internal::atomic_mutex);
+ __glibcxx_mutex_unlock(atomic_mutex);
return __result;
}
// Low-level functions for atomic operations: sh version -*- C++ -*-
-// Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005
+// Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
#include <bits/atomicity.h>
#include <bits/concurrence.h>
-namespace __gnu_internal
+namespace
{
__glibcxx_mutex_define_initialized(atomic_mutex);
-} // namespace __gnu_internal
+} // anonymous namespace
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
__attribute__ ((__unused__))
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
{
- __glibcxx_mutex_lock(__gnu_internal::atomic_mutex);
+ __glibcxx_mutex_lock(atomic_mutex);
_Atomic_word __result;
__result = *__mem;
*__mem += __val;
- __glibcxx_mutex_unlock(__gnu_internal::atomic_mutex);
+ __glibcxx_mutex_unlock(atomic_mutex);
return __result;
}
// Wrapper of C-language FILE struct -*- C++ -*-
-// Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006
+// 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
#include <limits> // For <off_t>::max() and min() and <streamsize>::max()
-namespace __gnu_internal
+namespace
{
// Map ios_base::openmode flags to a string for use in fopen().
// Table of valid combinations as given in [lib.filebuf.members]/2.
return __n1 + __n2 - __nleft;
}
#endif
-} // namespace __gnu_internal
+} // anonymous namespace
_GLIBCXX_BEGIN_NAMESPACE(std)
__basic_file<char>::sys_open(int __fd, ios_base::openmode __mode)
{
__basic_file* __ret = NULL;
- const char* __c_mode = __gnu_internal::fopen_mode(__mode);
+ const char* __c_mode = fopen_mode(__mode);
if (__c_mode && !this->is_open() && (_M_cfile = fdopen(__fd, __c_mode)))
{
char* __buf = NULL;
int /*__prot*/)
{
__basic_file* __ret = NULL;
- const char* __c_mode = __gnu_internal::fopen_mode(__mode);
+ const char* __c_mode = fopen_mode(__mode);
if (__c_mode && !this->is_open())
{
#ifdef _GLIBCXX_USE_LFS
streamsize
__basic_file<char>::xsputn(const char* __s, streamsize __n)
- { return __gnu_internal::xwrite(this->fd(), __s, __n); }
+ { return xwrite(this->fd(), __s, __n); }
streamsize
__basic_file<char>::xsputn_2(const char* __s1, streamsize __n1,
{
streamsize __ret = 0;
#ifdef _GLIBCXX_HAVE_WRITEV
- __ret = __gnu_internal::xwritev(this->fd(), __s1, __n1, __s2, __n2);
+ __ret = xwritev(this->fd(), __s1, __n1, __s2, __n2);
#else
if (__n1)
- __ret = __gnu_internal::xwrite(this->fd(), __s1, __n1);
+ __ret = xwrite(this->fd(), __s1, __n1);
if (__ret == __n1)
- __ret += __gnu_internal::xwrite(this->fd(), __s2, __n2);
+ __ret += xwrite(this->fd(), __s2, __n2);
#endif
return __ret;
}
#if _GLIBCXX_HAVE_TLS
-namespace __gnu_internal
+namespace
{
- using namespace abi;
- using namespace std;
-
- __cxa_eh_globals*
+ abi::__cxa_eh_globals*
get_global() throw()
{
- static __thread __cxa_eh_globals global;
+ static __thread abi::__cxa_eh_globals global;
return &global;
}
-}
+} // anonymous namespace
extern "C" __cxa_eh_globals*
__cxxabiv1::__cxa_get_globals_fast() throw()
-{ return __gnu_internal::get_global(); }
+{ return get_global(); }
extern "C" __cxa_eh_globals*
__cxxabiv1::__cxa_get_globals() throw()
-{ return __gnu_internal::get_global(); }
+{ return get_global(); }
#else