summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/include/bits/ios_base.h
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-27 00:49:50 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-27 00:49:50 +0000
commit94540c6bbdc54f3c45ad85552774420540cc133a (patch)
tree886de6d6c6bb866d655ffbb36b4a11fba3620151 /libstdc++-v3/include/bits/ios_base.h
parent6006bfb6e9171131308db5b074d63b1a7581b1df (diff)
downloadppe42-gcc-94540c6bbdc54f3c45ad85552774420540cc133a.tar.gz
ppe42-gcc-94540c6bbdc54f3c45ad85552774420540cc133a.zip
2004-02-25 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/atomicity.h: New, forward declarations for __atomic_add and __exchange_and_add. * config/cpu/generic/atomic_word.h: New, typdef for atomic word. * config/cpu/cris/atomic_word.h: Same. * config/cpu/sparc/atomic_word.h: Same. * include/bits/ios_base.h (_Callback_list::_M_remove_reference): Qualifiy with __gnu_cxx. (_Callback_list::_M_add_reference): Same. * include/bits/locale_classes.h (locale::facet::_M_add_reference): Add. (locale::facet::_M_remove_reference): Same. (locale::_Impl::_M_add_reference): Add. (locale::_Impl::_M_remove_reference): Same. * include/bits/basic_string.h (basic_string::_Rep::_M_refcopy): Same. (basic_string::_Rep::_M_dispose): Same. * src/ios.cc (ios_base::xalloc): Same. * src/ios_init.cc (ios_base::Init::Init): Same. (ios_base::Init::~Init): Same. * src/locale.cc (locale::id::_M_id): Same. * config/cpu/i486/atomicity.h: Use __gnu_cxx namespace. Remove static, and inline keyworks. * config/cpu/alpha/atomicity.h: Same. * config/cpu/cris/atomicity.h: Same. * config/cpu/generic/atomicity.h: Same. * config/cpu/hppa/atomicity.h: Same. * config/cpu/i386/atomicity.h: Same. * config/cpu/ia64/atomicity.h: Same. * config/cpu/m68k/atomicity.h: Same. * config/cpu/mips/atomicity.h: Same. * config/cpu/powerpc/atomicity.h: Same. * config/cpu/s390/atomicity.h: Same. * config/cpu/sparc/atomicity.h: Same. * src/Makefile.am (host_sources): Add atomicity.cc. (atomicity.cc): New rule. * src/Makefile.in: Regenerate. * include/Makefile.am (host_headers): Remove host atomicity.h. (host_headers): Add atomic_word.h. (bits_headers): Add bits atomicity.h. Change ATOMICITY_INC_SRCDIR to ATOMICITY_SRCDIR. * include/Makefile.in: Regenerate. * configure.host (atomic_word_dir): Add. * configure.ac: Substitute ATOMIC_WORD_SRCDIR. Change ATOMICITY_INC_SRCDIR to ATOMICITY_SRCDIR. * configure: Regenerate. * config/linker-map.gnu: Export __exchange_and_add, and __atomic_add. * testsuite/27_io/ios_base/cons/assign_neg.cc: Adjust line numbers. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78544 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits/ios_base.h')
-rw-r--r--libstdc++-v3/include/bits/ios_base.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/libstdc++-v3/include/bits/ios_base.h b/libstdc++-v3/include/bits/ios_base.h
index 3c05be03844..694785df1f5 100644
--- a/libstdc++-v3/include/bits/ios_base.h
+++ b/libstdc++-v3/include/bits/ios_base.h
@@ -1,6 +1,6 @@
// Iostreams base classes -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -435,11 +435,12 @@ namespace std
: _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { }
void
- _M_add_reference() { __atomic_add(&_M_refcount, 1); }
+ _M_add_reference() { __gnu_cxx::__atomic_add(&_M_refcount, 1); }
// 0 => OK to delete.
int
- _M_remove_reference() { return __exchange_and_add(&_M_refcount, -1); }
+ _M_remove_reference()
+ { return __gnu_cxx::__exchange_and_add(&_M_refcount, -1); }
};
_Callback_list* _M_callbacks;
OpenPOWER on IntegriCloud