From: Benjamin Kosnik Date: Tue, 12 Sep 2006 17:48:45 +0000 (+0000) Subject: eh_globals.cc: Remove __gnu_internal. X-Git-Tag: releases/gcc-4.2.0~1423 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c1a03f03117d454190e4f2e05cc1d68c3169132b;p=thirdparty%2Fgcc.git eh_globals.cc: Remove __gnu_internal. 2006-09-12 Benjamin Kosnik * 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. From-SVN: r116899 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 205074215d69..830adbf30663 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +2006-09-12 Benjamin Kosnik + + * 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 * include/bits/stl_heap.h (sort_heap): Iterator post-decrement is diff --git a/libstdc++-v3/config/abi/compatibility.h b/libstdc++-v3/config/abi/compatibility.h index 48abcde3d245..51a8acf26e5e 100644 --- a/libstdc++-v3/config/abi/compatibility.h +++ b/libstdc++-v3/config/abi/compatibility.h @@ -1,6 +1,6 @@ // 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 @@ -37,7 +37,7 @@ _ZNSt19istreambuf_iteratorIcSt11char_traitsIcEEppEv _ZNSt19istreambuf_iteratorIwSt11char_traitsIwEEppEv */ -namespace __gnu_internal +namespace { _GLIBCXX_APPLY_SYMVER(_ZNSt21istreambuf_iteratorXXIcSt11char_traitsIcEEppEv, _ZNSt19istreambuf_iteratorIcSt11char_traitsIcEEppEv) @@ -46,7 +46,7 @@ _GLIBCXX_APPLY_SYMVER(_ZNSt21istreambuf_iteratorXXIcSt11char_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 @@ -77,7 +77,7 @@ _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEv _ZNSt11char_traitsIcE2eqERKcS2_ _ZNSt11char_traitsIwE2eqERKwS2_ */ -namespace __gnu_internal +namespace { _GLIBCXX_APPLY_SYMVER(_ZNSt11char_traitsIcE4eqXXERKcS2_, _ZNSt11char_traitsIcE2eqERKcS2_) @@ -210,5 +210,5 @@ _GLIBCXX_APPLY_SYMVER(_ZNKSt16basic_ifstreamXXIwSt11char_traitsIwEE7is_openEv, _GLIBCXX_APPLY_SYMVER(_ZNKSt16basic_ofstreamXXIwSt11char_traitsIwEE7is_openEv, _ZNKSt14basic_ofstreamIwSt11char_traitsIwEE7is_openEv) #endif -} + } // anonymous namespace diff --git a/libstdc++-v3/config/cpu/generic/atomicity_mutex/atomicity.h b/libstdc++-v3/config/cpu/generic/atomicity_mutex/atomicity.h index 5ecb465e8627..e62c5ae6f28b 100644 --- a/libstdc++-v3/config/cpu/generic/atomicity_mutex/atomicity.h +++ b/libstdc++-v3/config/cpu/generic/atomicity_mutex/atomicity.h @@ -1,6 +1,6 @@ // 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 @@ -31,10 +31,10 @@ #include #include -namespace __gnu_internal +namespace { __glibcxx_mutex_define_initialized(atomic_mutex); -} // namespace __gnu_internal +} // anonymous namespace _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) @@ -42,11 +42,11 @@ _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; } diff --git a/libstdc++-v3/config/cpu/sh/atomicity.h b/libstdc++-v3/config/cpu/sh/atomicity.h index 7a15beb69d5e..2294c5d13ac0 100644 --- a/libstdc++-v3/config/cpu/sh/atomicity.h +++ b/libstdc++-v3/config/cpu/sh/atomicity.h @@ -1,6 +1,6 @@ // 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 @@ -77,10 +77,10 @@ __atomic_add (volatile _Atomic_word* __mem, int __val) #include #include -namespace __gnu_internal +namespace { __glibcxx_mutex_define_initialized(atomic_mutex); -} // namespace __gnu_internal +} // anonymous namespace _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) @@ -88,11 +88,11 @@ _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; } diff --git a/libstdc++-v3/config/io/basic_file_stdio.cc b/libstdc++-v3/config/io/basic_file_stdio.cc index 3f4914b29cd0..2bc17baead9c 100644 --- a/libstdc++-v3/config/io/basic_file_stdio.cc +++ b/libstdc++-v3/config/io/basic_file_stdio.cc @@ -1,6 +1,7 @@ // 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 @@ -70,7 +71,7 @@ #include // For ::max() and min() and ::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. @@ -172,7 +173,7 @@ namespace __gnu_internal return __n1 + __n2 - __nleft; } #endif -} // namespace __gnu_internal +} // anonymous namespace _GLIBCXX_BEGIN_NAMESPACE(std) @@ -209,7 +210,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __basic_file::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; @@ -226,7 +227,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) 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 @@ -291,7 +292,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) streamsize __basic_file::xsputn(const char* __s, streamsize __n) - { return __gnu_internal::xwrite(this->fd(), __s, __n); } + { return xwrite(this->fd(), __s, __n); } streamsize __basic_file::xsputn_2(const char* __s1, streamsize __n1, @@ -299,13 +300,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { 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; } diff --git a/libstdc++-v3/libsupc++/eh_globals.cc b/libstdc++-v3/libsupc++/eh_globals.cc index 08492e6054ea..424e375696e4 100644 --- a/libstdc++-v3/libsupc++/eh_globals.cc +++ b/libstdc++-v3/libsupc++/eh_globals.cc @@ -49,26 +49,23 @@ using namespace __cxxabiv1; #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