aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/src
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@gcc.gnu.org>2009-02-18 07:35:36 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2009-02-18 07:35:36 +0000
commit9b3003d59044a53cddf432024579295ef5df1ca7 (patch)
treed70eeaeb64ce9289bfb6e172e223f4c4cd5f2910 /libstdc++-v3/src
parent0705d3f487d2b8c709c25051f55079a6e22cb3d0 (diff)
downloadgcc-9b3003d59044a53cddf432024579295ef5df1ca7.zip
gcc-9b3003d59044a53cddf432024579295ef5df1ca7.tar.gz
gcc-9b3003d59044a53cddf432024579295ef5df1ca7.tar.bz2
system_error (system_category): To system_category().
2009-02-17 Benjamin Kosnik <bkoz@redhat.com> * include/std/system_error (system_category): To system_category(). (generic_category): To generic_category. DR 890. * src/system_error.cc: Define. * include/bits/functexcept.h: Only one __throw_system_error. * src/functexcept.cc: Same. * include/std/mutex: Fixup for changes above. * testsuite/19_diagnostics/error_condition/cons/1.cc: Same. * testsuite/19_diagnostics/error_code/cons/1.cc: Same. * testsuite/19_diagnostics/system_error/cons-1.cc: Same. * config/abi/pre/gnu.ver: Clean up exports. From-SVN: r144259
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r--libstdc++-v3/src/functexcept.cc18
-rw-r--r--libstdc++-v3/src/system_error.cc9
-rw-r--r--libstdc++-v3/src/thread.cc5
3 files changed, 12 insertions, 20 deletions
diff --git a/libstdc++-v3/src/functexcept.cc b/libstdc++-v3/src/functexcept.cc
index 266e035..d1352d7 100644
--- a/libstdc++-v3/src/functexcept.cc
+++ b/libstdc++-v3/src/functexcept.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2005, 2009 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
@@ -97,16 +97,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{ throw underflow_error(_(__s)); }
void
- __throw_system_error(const char* __s)
- { throw system_error(error_code(), _(__s)); }
+ __throw_ios_failure(const char* __s)
+ { throw ios_base::failure(_(__s)); }
void
__throw_system_error(int __i)
- { throw system_error(error_code(__i, generic_category)); }
-
- void
- __throw_ios_failure(const char* __s)
- { throw ios_base::failure(_(__s)); }
+ { throw system_error(error_code(__i, generic_category())); }
#else
void
__throw_bad_exception(void)
@@ -161,16 +157,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{ std::abort(); }
void
- __throw_system_error(const char* __s)
+ __throw_ios_failure(const char*)
{ std::abort(); }
void
__throw_system_error(int __i)
{ std::abort(); }
-
- void
- __throw_ios_failure(const char*)
- { std::abort(); }
#endif //__EXCEPTIONS
_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/system_error.cc b/libstdc++-v3/src/system_error.cc
index dd950eb..84e288e 100644
--- a/libstdc++-v3/src/system_error.cc
+++ b/libstdc++-v3/src/system_error.cc
@@ -1,6 +1,6 @@
// <system_error> implementation file
-// Copyright (C) 2007, 2008
+// Copyright (C) 2007, 2008, 2009
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -73,8 +73,11 @@ namespace
_GLIBCXX_BEGIN_NAMESPACE(std)
- const error_category& system_category = system_category_instance;
- const error_category& generic_category = generic_category_instance;
+ const error_category&
+ system_category() { return system_category_instance; }
+
+ const error_category&
+ generic_category() { return generic_category_instance; }
system_error::~system_error() throw() { }
diff --git a/libstdc++-v3/src/thread.cc b/libstdc++-v3/src/thread.cc
index ad39925..f28544d 100644
--- a/libstdc++-v3/src/thread.cc
+++ b/libstdc++-v3/src/thread.cc
@@ -62,10 +62,7 @@ namespace std
int __e = EINVAL;
if (_M_id != id())
- {
- void* __r = 0;
- __e = __gthread_join(_M_id._M_thread, &__r);
- }
+ __e = __gthread_join(_M_id._M_thread, NULL);
if (__e)
__throw_system_error(__e);