summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-12 17:48:45 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-12 17:48:45 +0000
commit29b001432b0febf545cc1f5ad59c932aab0ce3b2 (patch)
tree6db29cef50e6329534c0434e843f9be75b9833a3
parent6e2ff8f8a01a57ab9e67ca94a4aa6f33d7ab053e (diff)
downloadgcc-29b001432b0febf545cc1f5ad59c932aab0ce3b2.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116899 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/ChangeLog8
-rw-r--r--libstdc++-v3/config/abi/compatibility.h10
-rw-r--r--libstdc++-v3/config/cpu/generic/atomicity_mutex/atomicity.h10
-rw-r--r--libstdc++-v3/config/cpu/sh/atomicity.h10
-rw-r--r--libstdc++-v3/config/io/basic_file_stdio.cc19
-rw-r--r--libstdc++-v3/libsupc++/eh_globals.cc15
6 files changed, 39 insertions, 33 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 205074215d6..830adbf3066 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,11 @@
+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
diff --git a/libstdc++-v3/config/abi/compatibility.h b/libstdc++-v3/config/abi/compatibility.h
index 48abcde3d24..51a8acf26e5 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 5ecb465e862..e62c5ae6f28 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 <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)
@@ -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 7a15beb69d5..2294c5d13ac 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 <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)
@@ -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 3f4914b29cd..2bc17baead9 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 <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.
@@ -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<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;
@@ -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<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,
@@ -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 08492e6054e..424e375696e 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