From 55a47238cdf9f7e74b2584de7d1e4c8dfd0bdc62 Mon Sep 17 00:00:00 2001 From: Dave Korn Date: Fri, 29 Jan 2010 13:13:03 +0000 Subject: Synchronize libstdc++ as dll changes to mainline version, preparatory to adopting new "apply dllimport attribute to namespace" approach. * libstdc++-v3/src/Makefile.in: Synch to mainline. * libstdc++-v3/src/Makefile.am: Likewise. * libstdc++-v3/include/std/iostream: Likewise. * libstdc++-v3/include/std/stdexcept: Likewise. * libstdc++-v3/include/ext/concurrence.h: Likewise. * libstdc++-v3/include/bits/locale_classes.tcc: Likewise. * libstdc++-v3/include/bits/locale_facets.tcc: Likewise. * libstdc++-v3/include/bits/locale_classes.h: Likewise. * libstdc++-v3/include/bits/locale_facets.h: Likewise. * libstdc++-v3/include/bits/basic_ios.tcc: Likewise. * libstdc++-v3/include/bits/ios_base.h: Likewise. * libstdc++-v3/include/bits/istream.tcc: Likewise. * libstdc++-v3/include/bits/codecvt.h: Likewise. * libstdc++-v3/include/bits/ostream.tcc: Likewise. * libstdc++-v3/include/bits/sstream.tcc: Likewise. * libstdc++-v3/include/bits/c++config: Likewise. * libstdc++-v3/include/bits/basic_string.tcc: Likewise. * libstdc++-v3/include/bits/locale_facets_nonio.tcc: Likewise. * libstdc++-v3/include/bits/streambuf.tcc: Likewise. * libstdc++-v3/include/bits/fstream.tcc: Likewise. * libstdc++-v3/include/backward/strstream: Likewise. * libstdc++-v3/libsupc++/typeinfo: Likewise. * libstdc++-v3/libsupc++/exception: Likewise. * libstdc++-v3/libsupc++/new: Likewise. * libstdc++-v3/testsuite/lib/libstdc++.exp: Likewise. * libstdc++-v3/config/os/newlib/os_defines.h: Likewise. * libstdc++-v3/config/os/mingw32/os_defines.h: Likewise. * libstdc++-v3/include/profile/hashtable.h: Delete. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/cygwin-improvements@156349 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog.cygwin-improvements | 35 + libstdc++-v3/config/os/mingw32/os_defines.h | 6 - libstdc++-v3/config/os/newlib/os_defines.h | 7 - libstdc++-v3/include/backward/strstream | 8 +- libstdc++-v3/include/bits/basic_ios.tcc | 4 +- libstdc++-v3/include/bits/basic_string.tcc | 20 +- libstdc++-v3/include/bits/c++config | 4 - libstdc++-v3/include/bits/codecvt.h | 4 +- libstdc++-v3/include/bits/fstream.tcc | 16 +- libstdc++-v3/include/bits/ios_base.h | 6 +- libstdc++-v3/include/bits/istream.tcc | 8 +- libstdc++-v3/include/bits/locale_classes.h | 14 +- libstdc++-v3/include/bits/locale_classes.tcc | 8 +- libstdc++-v3/include/bits/locale_facets.h | 4 +- libstdc++-v3/include/bits/locale_facets.tcc | 20 +- libstdc++-v3/include/bits/locale_facets_nonio.tcc | 52 +- libstdc++-v3/include/bits/ostream.tcc | 4 +- libstdc++-v3/include/bits/sstream.tcc | 16 +- libstdc++-v3/include/bits/streambuf.tcc | 4 +- libstdc++-v3/include/ext/concurrence.h | 4 +- libstdc++-v3/include/profile/hashtable.h | 1151 --------------------- libstdc++-v3/include/std/iostream | 16 +- libstdc++-v3/include/std/stdexcept | 16 +- libstdc++-v3/libsupc++/exception | 4 +- libstdc++-v3/libsupc++/new | 2 +- libstdc++-v3/libsupc++/typeinfo | 6 +- libstdc++-v3/src/Makefile.am | 3 +- libstdc++-v3/src/Makefile.in | 3 +- libstdc++-v3/testsuite/lib/libstdc++.exp | 6 - 29 files changed, 155 insertions(+), 1296 deletions(-) delete mode 100644 libstdc++-v3/include/profile/hashtable.h diff --git a/libstdc++-v3/ChangeLog.cygwin-improvements b/libstdc++-v3/ChangeLog.cygwin-improvements index e24e4abdaa9..b74b41b5b6f 100644 --- a/libstdc++-v3/ChangeLog.cygwin-improvements +++ b/libstdc++-v3/ChangeLog.cygwin-improvements @@ -1,5 +1,40 @@ libstdc++-v3/ChangeLog.cygwin-improvements: +2010-01-29 Dave Korn + + Synchronize libstdc-as-dll changes to mainline version, preparatory to + adopting new "apply dllimport attribute to namespace" approach. + + * libstdc++-v3/src/Makefile.in: Synch to mainline. + * libstdc++-v3/src/Makefile.am: Likewise. + * libstdc++-v3/include/std/iostream: Likewise. + * libstdc++-v3/include/std/stdexcept: Likewise. + * libstdc++-v3/include/ext/concurrence.h: Likewise. + * libstdc++-v3/include/bits/locale_classes.tcc: Likewise. + * libstdc++-v3/include/bits/locale_facets.tcc: Likewise. + * libstdc++-v3/include/bits/locale_classes.h: Likewise. + * libstdc++-v3/include/bits/locale_facets.h: Likewise. + * libstdc++-v3/include/bits/basic_ios.tcc: Likewise. + * libstdc++-v3/include/bits/ios_base.h: Likewise. + * libstdc++-v3/include/bits/istream.tcc: Likewise. + * libstdc++-v3/include/bits/codecvt.h: Likewise. + * libstdc++-v3/include/bits/ostream.tcc: Likewise. + * libstdc++-v3/include/bits/sstream.tcc: Likewise. + * libstdc++-v3/include/bits/c++config: Likewise. + * libstdc++-v3/include/bits/basic_string.tcc: Likewise. + * libstdc++-v3/include/bits/locale_facets_nonio.tcc: Likewise. + * libstdc++-v3/include/bits/streambuf.tcc: Likewise. + * libstdc++-v3/include/bits/fstream.tcc: Likewise. + * libstdc++-v3/include/backward/strstream: Likewise. + * libstdc++-v3/libsupc++/typeinfo: Likewise. + * libstdc++-v3/libsupc++/exception: Likewise. + * libstdc++-v3/libsupc++/new: Likewise. + * libstdc++-v3/testsuite/lib/libstdc++.exp: Likewise. + * libstdc++-v3/config/os/newlib/os_defines.h: Likewise. + * libstdc++-v3/config/os/mingw32/os_defines.h: Likewise. + + * libstdc++-v3/include/profile/hashtable.h: Delete. + 2009-09-16 Dave Korn Danny Smith Aaron W. LaFramboise diff --git a/libstdc++-v3/config/os/mingw32/os_defines.h b/libstdc++-v3/config/os/mingw32/os_defines.h index 326dc25fed7..5435ce9ae84 100644 --- a/libstdc++-v3/config/os/mingw32/os_defines.h +++ b/libstdc++-v3/config/os/mingw32/os_defines.h @@ -60,10 +60,4 @@ // See libstdc++/37522. #define _GLIBCXX_HAVE_BROKEN_VSWPRINTF 1 -#ifdef _GLIBCXX_DLL -#define _GLIBCXX_IMPORT __attribute__((dllimport)) -#else -#define _GLIBCXX_IMPORT -#endif - #endif diff --git a/libstdc++-v3/config/os/newlib/os_defines.h b/libstdc++-v3/config/os/newlib/os_defines.h index 956bf2801a5..1ff3d4846cb 100644 --- a/libstdc++-v3/config/os/newlib/os_defines.h +++ b/libstdc++-v3/config/os/newlib/os_defines.h @@ -47,13 +47,6 @@ // See libstdc++/20806. #define _GLIBCXX_HAVE_DOS_BASED_FILESYSTEM 1 - -#ifdef _GLIBCXX_DLL -#define _GLIBCXX_IMPORT __attribute__((dllimport)) -#else -#define _GLIBCXX_IMPORT -#endif - #endif #endif diff --git a/libstdc++-v3/include/backward/strstream b/libstdc++-v3/include/backward/strstream index ba2effee814..0ffbb81ea97 100644 --- a/libstdc++-v3/include/backward/strstream +++ b/libstdc++-v3/include/backward/strstream @@ -54,7 +54,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // Class strstreambuf, a streambuf class that manages an array of char. // Note that this class is not a template. - class _GLIBCXX_IMPORT strstreambuf : public basic_streambuf > + class strstreambuf : public basic_streambuf > { public: // Types. @@ -116,7 +116,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) }; // Class istrstream, an istream that manages a strstreambuf. - class _GLIBCXX_IMPORT istrstream : public basic_istream + class istrstream : public basic_istream { public: explicit istrstream(char*); @@ -133,7 +133,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) }; // Class ostrstream - class _GLIBCXX_IMPORT ostrstream : public basic_ostream + class ostrstream : public basic_ostream { public: ostrstream(); @@ -150,7 +150,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) }; // Class strstream - class _GLIBCXX_IMPORT strstream : public basic_iostream + class strstream : public basic_iostream { public: typedef char char_type; diff --git a/libstdc++-v3/include/bits/basic_ios.tcc b/libstdc++-v3/include/bits/basic_ios.tcc index 795dda07d7f..a0dc67e5436 100644 --- a/libstdc++-v3/include/bits/basic_ios.tcc +++ b/libstdc++-v3/include/bits/basic_ios.tcc @@ -175,10 +175,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // which are defined via explicit instantiations elsewhere. // NB: This syntax is a GNU extension. #if _GLIBCXX_EXTERN_TEMPLATE - extern template class _GLIBCXX_IMPORT basic_ios; + extern template class basic_ios; #ifdef _GLIBCXX_USE_WCHAR_T - extern template class _GLIBCXX_IMPORT basic_ios; + extern template class basic_ios; #endif #endif diff --git a/libstdc++-v3/include/bits/basic_string.tcc b/libstdc++-v3/include/bits/basic_string.tcc index a24d97246d0..d450a4717de 100644 --- a/libstdc++-v3/include/bits/basic_string.tcc +++ b/libstdc++-v3/include/bits/basic_string.tcc @@ -1130,32 +1130,32 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // which are defined via explicit instantiations elsewhere. // NB: This syntax is a GNU extension. #if _GLIBCXX_EXTERN_TEMPLATE > 0 - extern template class _GLIBCXX_IMPORT basic_string; - extern template _GLIBCXX_IMPORT + extern template class basic_string; + extern template basic_istream& operator>>(basic_istream&, string&); - extern template _GLIBCXX_IMPORT + extern template basic_ostream& operator<<(basic_ostream&, const string&); - extern template _GLIBCXX_IMPORT + extern template basic_istream& getline(basic_istream&, string&, char); - extern template _GLIBCXX_IMPORT + extern template basic_istream& getline(basic_istream&, string&); #ifdef _GLIBCXX_USE_WCHAR_T - extern template class _GLIBCXX_IMPORT basic_string; - extern template _GLIBCXX_IMPORT + extern template class basic_string; + extern template basic_istream& operator>>(basic_istream&, wstring&); - extern template _GLIBCXX_IMPORT + extern template basic_ostream& operator<<(basic_ostream&, const wstring&); - extern template _GLIBCXX_IMPORT + extern template basic_istream& getline(basic_istream&, wstring&, wchar_t); - extern template _GLIBCXX_IMPORT + extern template basic_istream& getline(basic_istream&, wstring&); #endif diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index 2624f141fd1..3746696458a 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -376,8 +376,4 @@ _GLIBCXX_END_NAMESPACE # endif #endif -#ifndef _GLIBCXX_IMPORT -#define _GLIBCXX_IMPORT -#endif - // End of prewritten config; the discovered settings follow. diff --git a/libstdc++-v3/include/bits/codecvt.h b/libstdc++-v3/include/bits/codecvt.h index f232737e3e6..2dbb4986337 100644 --- a/libstdc++-v3/include/bits/codecvt.h +++ b/libstdc++-v3/include/bits/codecvt.h @@ -469,7 +469,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // which are defined via explicit instantiations elsewhere. // NB: This syntax is a GNU extension. #if _GLIBCXX_EXTERN_TEMPLATE - extern template class _GLIBCXX_IMPORT codecvt_byname; + extern template class codecvt_byname; extern template const codecvt& @@ -480,7 +480,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) has_facet >(const locale&); #ifdef _GLIBCXX_USE_WCHAR_T - extern template class _GLIBCXX_IMPORT codecvt_byname; + extern template class codecvt_byname; extern template const codecvt& diff --git a/libstdc++-v3/include/bits/fstream.tcc b/libstdc++-v3/include/bits/fstream.tcc index bb8311ac4d5..c5f7f8c52af 100644 --- a/libstdc++-v3/include/bits/fstream.tcc +++ b/libstdc++-v3/include/bits/fstream.tcc @@ -908,16 +908,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // which are defined via explicit instantiations elsewhere. // NB: This syntax is a GNU extension. #if _GLIBCXX_EXTERN_TEMPLATE - extern template class _GLIBCXX_IMPORT basic_filebuf; - extern template class _GLIBCXX_IMPORT basic_ifstream; - extern template class _GLIBCXX_IMPORT basic_ofstream; - extern template class _GLIBCXX_IMPORT basic_fstream; + extern template class basic_filebuf; + extern template class basic_ifstream; + extern template class basic_ofstream; + extern template class basic_fstream; #ifdef _GLIBCXX_USE_WCHAR_T - extern template class _GLIBCXX_IMPORT basic_filebuf; - extern template class _GLIBCXX_IMPORT basic_ifstream; - extern template class _GLIBCXX_IMPORT basic_ofstream; - extern template class _GLIBCXX_IMPORT basic_fstream; + extern template class basic_filebuf; + extern template class basic_ifstream; + extern template class basic_ofstream; + extern template class basic_fstream; #endif #endif diff --git a/libstdc++-v3/include/bits/ios_base.h b/libstdc++-v3/include/bits/ios_base.h index 27c6725157e..2badd4c4c1c 100644 --- a/libstdc++-v3/include/bits/ios_base.h +++ b/libstdc++-v3/include/bits/ios_base.h @@ -204,7 +204,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * people will only see @c ios_base when they need to specify the full * name of the various I/O flags (e.g., the openmodes). */ - class _GLIBCXX_IMPORT ios_base + class ios_base { public: @@ -214,7 +214,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * * 27.4.2.1.1 Class ios_base::failure */ - class _GLIBCXX_IMPORT failure : public exception + class failure : public exception { public: // _GLIBCXX_RESOLVE_LIB_DEFECTS @@ -534,7 +534,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // Used to initialize standard streams. In theory, g++ could use // -finit-priority to order this stuff correctly without going // through these machinations. - class _GLIBCXX_IMPORT Init + class Init { friend class ios_base; public: diff --git a/libstdc++-v3/include/bits/istream.tcc b/libstdc++-v3/include/bits/istream.tcc index f85ce4e4a9f..d005f736f03 100644 --- a/libstdc++-v3/include/bits/istream.tcc +++ b/libstdc++-v3/include/bits/istream.tcc @@ -1018,7 +1018,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // which are defined via explicit instantiations elsewhere. // NB: This syntax is a GNU extension. #if _GLIBCXX_EXTERN_TEMPLATE - extern template class _GLIBCXX_IMPORT basic_istream; + extern template class basic_istream; extern template istream& ws(istream&); extern template istream& operator>>(istream&, char&); extern template istream& operator>>(istream&, char*); @@ -1041,10 +1041,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std) extern template istream& istream::_M_extract(long double&); extern template istream& istream::_M_extract(void*&); - extern template class _GLIBCXX_IMPORT basic_iostream; + extern template class basic_iostream; #ifdef _GLIBCXX_USE_WCHAR_T - extern template class _GLIBCXX_IMPORT basic_istream; + extern template class basic_istream; extern template wistream& ws(wistream&); extern template wistream& operator>>(wistream&, wchar_t&); extern template wistream& operator>>(wistream&, wchar_t*); @@ -1063,7 +1063,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) extern template wistream& wistream::_M_extract(long double&); extern template wistream& wistream::_M_extract(void*&); - extern template class _GLIBCXX_IMPORT basic_iostream; + extern template class basic_iostream; #endif #endif diff --git a/libstdc++-v3/include/bits/locale_classes.h b/libstdc++-v3/include/bits/locale_classes.h index c6a5322668e..7ae9c53bc6a 100644 --- a/libstdc++-v3/include/bits/locale_classes.h +++ b/libstdc++-v3/include/bits/locale_classes.h @@ -58,7 +58,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * This library supports efficient construction and copying of locales * through a reference counting implementation of the locale class. */ - class _GLIBCXX_IMPORT locale + class locale { public: // Types: @@ -66,9 +66,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) typedef int category; // Forward decls and friends: - class _GLIBCXX_IMPORT facet; - class _GLIBCXX_IMPORT id; - class _GLIBCXX_IMPORT _Impl; + class facet; + class id; + class _Impl; friend class facet; friend class _Impl; @@ -332,7 +332,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * * Facets may not be copied or assigned. */ - class _GLIBCXX_IMPORT locale::facet + class locale::facet { private: friend class locale; @@ -426,7 +426,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * cannot be used in a locale. The locale::id ensures that each class * type gets a unique identifier. */ - class _GLIBCXX_IMPORT locale::id + class locale::id { private: friend class locale; @@ -465,7 +465,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // Implementation object for locale. - class _GLIBCXX_IMPORT locale::_Impl + class locale::_Impl { public: // Friends. diff --git a/libstdc++-v3/include/bits/locale_classes.tcc b/libstdc++-v3/include/bits/locale_classes.tcc index 882746e2650..5dcf20576a0 100644 --- a/libstdc++-v3/include/bits/locale_classes.tcc +++ b/libstdc++-v3/include/bits/locale_classes.tcc @@ -241,8 +241,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // which are defined via explicit instantiations elsewhere. // NB: This syntax is a GNU extension. #if _GLIBCXX_EXTERN_TEMPLATE - extern template class _GLIBCXX_IMPORT collate; - extern template class _GLIBCXX_IMPORT collate_byname; + extern template class collate; + extern template class collate_byname; extern template const collate& @@ -253,8 +253,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) has_facet >(const locale&); #ifdef _GLIBCXX_USE_WCHAR_T - extern template class _GLIBCXX_IMPORT collate; - extern template class _GLIBCXX_IMPORT collate_byname; + extern template class collate; + extern template class collate_byname; extern template const collate& diff --git a/libstdc++-v3/include/bits/locale_facets.h b/libstdc++-v3/include/bits/locale_facets.h index 98663504bc0..5dec0f49cbe 100644 --- a/libstdc++-v3/include/bits/locale_facets.h +++ b/libstdc++-v3/include/bits/locale_facets.h @@ -671,7 +671,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * optimizations as well. */ template<> - class _GLIBCXX_IMPORT ctype : public locale::facet, public ctype_base + class ctype : public locale::facet, public ctype_base { public: // Types: @@ -1172,7 +1172,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * __ctype_abstract_base. */ template<> - class _GLIBCXX_IMPORT ctype : public __ctype_abstract_base + class ctype : public __ctype_abstract_base { public: // Types: diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc index 2cbe1325e6f..1608e2c42da 100644 --- a/libstdc++-v3/include/bits/locale_facets.tcc +++ b/libstdc++-v3/include/bits/locale_facets.tcc @@ -1276,11 +1276,11 @@ _GLIBCXX_END_LDBL_NAMESPACE // which are defined via explicit instantiations elsewhere. // NB: This syntax is a GNU extension. #if _GLIBCXX_EXTERN_TEMPLATE - extern template class _GLIBCXX_IMPORT numpunct; - extern template class _GLIBCXX_IMPORT numpunct_byname; - extern template class _GLIBCXX_IMPORT _GLIBCXX_LDBL_NAMESPACE num_get; - extern template class _GLIBCXX_IMPORT _GLIBCXX_LDBL_NAMESPACE num_put; - extern template class _GLIBCXX_IMPORT ctype_byname; + extern template class numpunct; + extern template class numpunct_byname; + extern template class _GLIBCXX_LDBL_NAMESPACE num_get; + extern template class _GLIBCXX_LDBL_NAMESPACE num_put; + extern template class ctype_byname; extern template const ctype& @@ -1315,11 +1315,11 @@ _GLIBCXX_END_LDBL_NAMESPACE has_facet >(const locale&); #ifdef _GLIBCXX_USE_WCHAR_T - extern template class _GLIBCXX_IMPORT numpunct; - extern template class _GLIBCXX_IMPORT numpunct_byname; - extern template class _GLIBCXX_IMPORT _GLIBCXX_LDBL_NAMESPACE num_get; - extern template class _GLIBCXX_IMPORT _GLIBCXX_LDBL_NAMESPACE num_put; - extern template class _GLIBCXX_IMPORT ctype_byname; + extern template class numpunct; + extern template class numpunct_byname; + extern template class _GLIBCXX_LDBL_NAMESPACE num_get; + extern template class _GLIBCXX_LDBL_NAMESPACE num_put; + extern template class ctype_byname; extern template const ctype& diff --git a/libstdc++-v3/include/bits/locale_facets_nonio.tcc b/libstdc++-v3/include/bits/locale_facets_nonio.tcc index ec5843c00ba..48a913901e7 100644 --- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc +++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc @@ -1214,19 +1214,19 @@ _GLIBCXX_END_LDBL_NAMESPACE // which are defined via explicit instantiations elsewhere. // NB: This syntax is a GNU extension. #if _GLIBCXX_EXTERN_TEMPLATE - extern template class _GLIBCXX_IMPORT moneypunct; - extern template class _GLIBCXX_IMPORT moneypunct; - extern template class _GLIBCXX_IMPORT moneypunct_byname; - extern template class _GLIBCXX_IMPORT moneypunct_byname; - extern template class _GLIBCXX_IMPORT _GLIBCXX_LDBL_NAMESPACE money_get; - extern template class _GLIBCXX_IMPORT _GLIBCXX_LDBL_NAMESPACE money_put; - extern template class _GLIBCXX_IMPORT __timepunct; - extern template class _GLIBCXX_IMPORT time_put; - extern template class _GLIBCXX_IMPORT time_put_byname; - extern template class _GLIBCXX_IMPORT time_get; - extern template class _GLIBCXX_IMPORT time_get_byname; - extern template class _GLIBCXX_IMPORT messages; - extern template class _GLIBCXX_IMPORT messages_byname; + extern template class moneypunct; + extern template class moneypunct; + extern template class moneypunct_byname; + extern template class moneypunct_byname; + extern template class _GLIBCXX_LDBL_NAMESPACE money_get; + extern template class _GLIBCXX_LDBL_NAMESPACE money_put; + extern template class __timepunct; + extern template class time_put; + extern template class time_put_byname; + extern template class time_get; + extern template class time_get_byname; + extern template class messages; + extern template class messages_byname; extern template const moneypunct& @@ -1289,19 +1289,19 @@ _GLIBCXX_END_LDBL_NAMESPACE has_facet >(const locale&); #ifdef _GLIBCXX_USE_WCHAR_T - extern template class _GLIBCXX_IMPORT moneypunct; - extern template class _GLIBCXX_IMPORT moneypunct; - extern template class _GLIBCXX_IMPORT moneypunct_byname; - extern template class _GLIBCXX_IMPORT moneypunct_byname; - extern template class _GLIBCXX_IMPORT _GLIBCXX_LDBL_NAMESPACE money_get; - extern template class _GLIBCXX_IMPORT _GLIBCXX_LDBL_NAMESPACE money_put; - extern template class _GLIBCXX_IMPORT __timepunct; - extern template class _GLIBCXX_IMPORT time_put; - extern template class _GLIBCXX_IMPORT time_put_byname; - extern template class _GLIBCXX_IMPORT time_get; - extern template class _GLIBCXX_IMPORT time_get_byname; - extern template class _GLIBCXX_IMPORT messages; - extern template class _GLIBCXX_IMPORT messages_byname; + extern template class moneypunct; + extern template class moneypunct; + extern template class moneypunct_byname; + extern template class moneypunct_byname; + extern template class _GLIBCXX_LDBL_NAMESPACE money_get; + extern template class _GLIBCXX_LDBL_NAMESPACE money_put; + extern template class __timepunct; + extern template class time_put; + extern template class time_put_byname; + extern template class time_get; + extern template class time_get_byname; + extern template class messages; + extern template class messages_byname; extern template const moneypunct& diff --git a/libstdc++-v3/include/bits/ostream.tcc b/libstdc++-v3/include/bits/ostream.tcc index 4293b9cc9d8..1147212aa14 100644 --- a/libstdc++-v3/include/bits/ostream.tcc +++ b/libstdc++-v3/include/bits/ostream.tcc @@ -357,7 +357,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // which are defined via explicit instantiations elsewhere. // NB: This syntax is a GNU extension. #if _GLIBCXX_EXTERN_TEMPLATE - extern template class _GLIBCXX_IMPORT basic_ostream; + extern template class basic_ostream; extern template ostream& endl(ostream&); extern template ostream& ends(ostream&); extern template ostream& flush(ostream&); @@ -380,7 +380,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) extern template ostream& ostream::_M_insert(const void*); #ifdef _GLIBCXX_USE_WCHAR_T - extern template class _GLIBCXX_IMPORT basic_ostream; + extern template class basic_ostream; extern template wostream& endl(wostream&); extern template wostream& ends(wostream&); extern template wostream& flush(wostream&); diff --git a/libstdc++-v3/include/bits/sstream.tcc b/libstdc++-v3/include/bits/sstream.tcc index f0f03d1caed..0f9db8e93f5 100644 --- a/libstdc++-v3/include/bits/sstream.tcc +++ b/libstdc++-v3/include/bits/sstream.tcc @@ -255,16 +255,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // which are defined via explicit instantiations elsewhere. // NB: This syntax is a GNU extension. #if _GLIBCXX_EXTERN_TEMPLATE - extern template class _GLIBCXX_IMPORT basic_stringbuf; - extern template class _GLIBCXX_IMPORT basic_istringstream; - extern template class _GLIBCXX_IMPORT basic_ostringstream; - extern template class _GLIBCXX_IMPORT basic_stringstream; + extern template class basic_stringbuf; + extern template class basic_istringstream; + extern template class basic_ostringstream; + extern template class basic_stringstream; #ifdef _GLIBCXX_USE_WCHAR_T - extern template class _GLIBCXX_IMPORT basic_stringbuf; - extern template class _GLIBCXX_IMPORT basic_istringstream; - extern template class _GLIBCXX_IMPORT basic_ostringstream; - extern template class _GLIBCXX_IMPORT basic_stringstream; + extern template class basic_stringbuf; + extern template class basic_istringstream; + extern template class basic_ostringstream; + extern template class basic_stringstream; #endif #endif diff --git a/libstdc++-v3/include/bits/streambuf.tcc b/libstdc++-v3/include/bits/streambuf.tcc index 4858f7b7245..f3e6ce74945 100644 --- a/libstdc++-v3/include/bits/streambuf.tcc +++ b/libstdc++-v3/include/bits/streambuf.tcc @@ -146,7 +146,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // which are defined via explicit instantiations elsewhere. // NB: This syntax is a GNU extension. #if _GLIBCXX_EXTERN_TEMPLATE - extern template class _GLIBCXX_IMPORT basic_streambuf; + extern template class basic_streambuf; extern template streamsize __copy_streambufs(basic_streambuf*, @@ -157,7 +157,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) basic_streambuf*, bool&); #ifdef _GLIBCXX_USE_WCHAR_T - extern template class _GLIBCXX_IMPORT basic_streambuf; + extern template class basic_streambuf; extern template streamsize __copy_streambufs(basic_streambuf*, diff --git a/libstdc++-v3/include/ext/concurrence.h b/libstdc++-v3/include/ext/concurrence.h index d772c874628..71f8cd0a707 100644 --- a/libstdc++-v3/include/ext/concurrence.h +++ b/libstdc++-v3/include/ext/concurrence.h @@ -60,7 +60,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) // NB: As this is used in libsupc++, need to only depend on // exception. No stdexception classes, no use of std::string. - class _GLIBCXX_IMPORT __concurrence_lock_error : public std::exception + class __concurrence_lock_error : public std::exception { public: virtual char const* @@ -68,7 +68,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) { return "__gnu_cxx::__concurrence_lock_error"; } }; - class _GLIBCXX_IMPORT __concurrence_unlock_error : public std::exception + class __concurrence_unlock_error : public std::exception { public: virtual char const* diff --git a/libstdc++-v3/include/profile/hashtable.h b/libstdc++-v3/include/profile/hashtable.h deleted file mode 100644 index 20891877121..00000000000 --- a/libstdc++-v3/include/profile/hashtable.h +++ /dev/null @@ -1,1151 +0,0 @@ -// Hashtable implementation used by containers -*- C++ -*- - -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 -// 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 -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. - -// As a special exception, you may use this file as part of a free software -// library without restriction. Specifically, if other files instantiate -// templates or use macros or inline functions from this file, or you compile -// this file and link it with other files to produce an executable, this -// file does not by itself cause the resulting executable to be covered by -// the GNU General Public License. This exception does not however -// invalidate any other reasons why the executable file might be covered by -// the GNU General Public License. - -/* - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Silicon Graphics makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - * - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Hewlett-Packard Company makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - * - */ - -/** @file profile/hashtable.h copied from backward/hashtable.h - * This file is a GNU extension to the Standard C++ Library (possibly - * containing extensions from the HP/SGI STL subset). - */ - -#ifndef _HASHTABLE_H -#define _HASHTABLE_H 1 - -// Hashtable class, used to implement the hashed associative containers -// hash_set, hash_map, hash_multiset, and hash_multimap. -// Skip instrumentation on vector. -#include -#include -#include -#include -#include -#include - -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) - - using std::size_t; - using std::ptrdiff_t; - using std::forward_iterator_tag; - using std::input_iterator_tag; - using std::_Construct; - using std::_Destroy; - using std::distance; - using std::_GLIBCXX_STD_D::vector; - using std::pair; - using std::__iterator_category; - - template - struct _Hashtable_node - { - _Hashtable_node* _M_next; - _Val _M_val; - }; - - template > - class hashtable; - - template - struct _Hashtable_iterator; - - template - struct _Hashtable_const_iterator; - - template - struct _Hashtable_iterator - { - typedef hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc> - _Hashtable; - typedef _Hashtable_iterator<_Val, _Key, _HashFcn, - _ExtractKey, _EqualKey, _Alloc> - iterator; - typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn, - _ExtractKey, _EqualKey, _Alloc> - const_iterator; - typedef _Hashtable_node<_Val> _Node; - typedef forward_iterator_tag iterator_category; - typedef _Val value_type; - typedef ptrdiff_t difference_type; - typedef size_t size_type; - typedef _Val& reference; - typedef _Val* pointer; - - _Node* _M_cur; - _Hashtable* _M_ht; - - _Hashtable_iterator(_Node* __n, _Hashtable* __tab) - : _M_cur(__n), _M_ht(__tab) { } - - _Hashtable_iterator() { } - - reference - operator*() const - { return _M_cur->_M_val; } - - pointer - operator->() const - { return &(operator*()); } - - iterator& - operator++(); - - iterator - operator++(int); - - bool - operator==(const iterator& __it) const - { return _M_cur == __it._M_cur; } - - bool - operator!=(const iterator& __it) const - { return _M_cur != __it._M_cur; } - }; - - template - struct _Hashtable_const_iterator - { - typedef hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc> - _Hashtable; - typedef _Hashtable_iterator<_Val,_Key,_HashFcn, - _ExtractKey,_EqualKey,_Alloc> - iterator; - typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn, - _ExtractKey, _EqualKey, _Alloc> - const_iterator; - typedef _Hashtable_node<_Val> _Node; - - typedef forward_iterator_tag iterator_category; - typedef _Val value_type; - typedef ptrdiff_t difference_type; - typedef size_t size_type; - typedef const _Val& reference; - typedef const _Val* pointer; - - const _Node* _M_cur; - const _Hashtable* _M_ht; - - _Hashtable_const_iterator(const _Node* __n, const _Hashtable* __tab) - : _M_cur(__n), _M_ht(__tab) { } - - _Hashtable_const_iterator() { } - - _Hashtable_const_iterator(const iterator& __it) - : _M_cur(__it._M_cur), _M_ht(__it._M_ht) { } - - reference - operator*() const - { return _M_cur->_M_val; } - - pointer - operator->() const - { return &(operator*()); } - - const_iterator& - operator++(); - - const_iterator - operator++(int); - - bool - operator==(const const_iterator& __it) const - { return _M_cur == __it._M_cur; } - - bool - operator!=(const const_iterator& __it) const - { return _M_cur != __it._M_cur; } - }; - - // Note: assumes long is at least 32 bits. - enum { _S_num_primes = 28 }; - - static const unsigned long __stl_prime_list[_S_num_primes] = - { - 53ul, 97ul, 193ul, 389ul, 769ul, - 1543ul, 3079ul, 6151ul, 12289ul, 24593ul, - 49157ul, 98317ul, 196613ul, 393241ul, 786433ul, - 1572869ul, 3145739ul, 6291469ul, 12582917ul, 25165843ul, - 50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul, - 1610612741ul, 3221225473ul, 4294967291ul - }; - - inline unsigned long - __stl_next_prime(unsigned long __n) - { - const unsigned long* __first = __stl_prime_list; - const unsigned long* __last = __stl_prime_list + (int)_S_num_primes; - const unsigned long* pos = std::lower_bound(__first, __last, __n); - return pos == __last ? *(__last - 1) : *pos; - } - - // Forward declaration of operator==. - template - class hashtable; - - template - bool - operator==(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1, - const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2); - - // Hashtables handle allocators a bit differently than other - // containers do. If we're using standard-conforming allocators, then - // a hashtable unconditionally has a member variable to hold its - // allocator, even if it so happens that all instances of the - // allocator type are identical. This is because, for hashtables, - // this extra storage is negligible. Additionally, a base class - // wouldn't serve any other purposes; it wouldn't, for example, - // simplify the exception-handling code. - template - class hashtable - { - public: - typedef _Key key_type; - typedef _Val value_type; - typedef _HashFcn hasher; - typedef _EqualKey key_equal; - - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef value_type* pointer; - typedef const value_type* const_pointer; - typedef value_type& reference; - typedef const value_type& const_reference; - - hasher - hash_funct() const - { return _M_hash; } - - key_equal - key_eq() const - { return _M_equals; } - - private: - typedef _Hashtable_node<_Val> _Node; - - public: - typedef typename _Alloc::template rebind::other allocator_type; - allocator_type - get_allocator() const - { return _M_node_allocator; } - - private: - typedef typename _Alloc::template rebind<_Node>::other _Node_Alloc; - typedef typename _Alloc::template rebind<_Node*>::other _Nodeptr_Alloc; - typedef vector<_Node*, _Nodeptr_Alloc> _Vector_type; - - _Node_Alloc _M_node_allocator; - - _Node* - _M_get_node() - { return _M_node_allocator.allocate(1); } - - void - _M_put_node(_Node* __p) - { _M_node_allocator.deallocate(__p, 1); } - - private: - hasher _M_hash; - key_equal _M_equals; - _ExtractKey _M_get_key; - _Vector_type _M_buckets; - size_type _M_num_elements; - - public: - typedef _Hashtable_iterator<_Val, _Key, _HashFcn, _ExtractKey, - _EqualKey, _Alloc> - iterator; - typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn, _ExtractKey, - _EqualKey, _Alloc> - const_iterator; - - friend struct - _Hashtable_iterator<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>; - - friend struct - _Hashtable_const_iterator<_Val, _Key, _HashFcn, _ExtractKey, - _EqualKey, _Alloc>; - - public: - hashtable(size_type __n, const _HashFcn& __hf, - const _EqualKey& __eql, const _ExtractKey& __ext, - const allocator_type& __a = allocator_type()) - : _M_node_allocator(__a), _M_hash(__hf), _M_equals(__eql), - _M_get_key(__ext), _M_buckets(__a), _M_num_elements(0) - { _M_initialize_buckets(__n); } - - hashtable(size_type __n, const _HashFcn& __hf, - const _EqualKey& __eql, - const allocator_type& __a = allocator_type()) - : _M_node_allocator(__a), _M_hash(__hf), _M_equals(__eql), - _M_get_key(_ExtractKey()), _M_buckets(__a), _M_num_elements(0) - { _M_initialize_buckets(__n); } - - hashtable(const hashtable& __ht) - : _M_node_allocator(__ht.get_allocator()), _M_hash(__ht._M_hash), - _M_equals(__ht._M_equals), _M_get_key(__ht._M_get_key), - _M_buckets(__ht.get_allocator()), _M_num_elements(0) - { _M_copy_from(__ht); } - - hashtable& - operator= (const hashtable& __ht) - { - if (&__ht != this) - { - clear(); - _M_hash = __ht._M_hash; - _M_equals = __ht._M_equals; - _M_get_key = __ht._M_get_key; - _M_copy_from(__ht); - } - return *this; - } - - ~hashtable() - { clear(); } - - size_type - size() const - { return _M_num_elements; } - - size_type - max_size() const - { return size_type(-1); } - - bool - empty() const - { return size() == 0; } - - void - swap(hashtable& __ht) - { - std::swap(_M_hash, __ht._M_hash); - std::swap(_M_equals, __ht._M_equals); - std::swap(_M_get_key, __ht._M_get_key); - _M_buckets.swap(__ht._M_buckets); - std::swap(_M_num_elements, __ht._M_num_elements); - } - - iterator - begin() - { - for (size_type __n = 0; __n < _M_buckets.size(); ++__n) - if (_M_buckets[__n]) - return iterator(_M_buckets[__n], this); - return end(); - } - - iterator - end() - { return iterator(0, this); } - - const_iterator - begin() const - { - for (size_type __n = 0; __n < _M_buckets.size(); ++__n) - if (_M_buckets[__n]) - return const_iterator(_M_buckets[__n], this); - return end(); - } - - const_iterator - end() const - { return const_iterator(0, this); } - - template - friend bool - operator==(const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&, - const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&); - - public: - size_type - bucket_count() const - { return _M_buckets.size(); } - - size_type - max_bucket_count() const - { return __stl_prime_list[(int)_S_num_primes - 1]; } - - size_type - elems_in_bucket(size_type __bucket) const - { - size_type __result = 0; - for (_Node* __n = _M_buckets[__bucket]; __n; __n = __n->_M_next) - __result += 1; - return __result; - } - - pair - insert_unique(const value_type& __obj) - { - resize(_M_num_elements + 1); - return insert_unique_noresize(__obj); - } - - iterator - insert_equal(const value_type& __obj) - { - resize(_M_num_elements + 1); - return insert_equal_noresize(__obj); - } - - pair - insert_unique_noresize(const value_type& __obj); - - iterator - insert_equal_noresize(const value_type& __obj); - - template - void - insert_unique(_InputIterator __f, _InputIterator __l) - { insert_unique(__f, __l, __iterator_category(__f)); } - - template - void - insert_equal(_InputIterator __f, _InputIterator __l) - { insert_equal(__f, __l, __iterator_category(__f)); } - - template - void - insert_unique(_InputIterator __f, _InputIterator __l, - input_iterator_tag) - { - for ( ; __f != __l; ++__f) - insert_unique(*__f); - } - - template - void - insert_equal(_InputIterator __f, _InputIterator __l, - input_iterator_tag) - { - for ( ; __f != __l; ++__f) - insert_equal(*__f); - } - - template - void - insert_unique(_ForwardIterator __f, _ForwardIterator __l, - forward_iterator_tag) - { - size_type __n = distance(__f, __l); - resize(_M_num_elements + __n); - for ( ; __n > 0; --__n, ++__f) - insert_unique_noresize(*__f); - } - - template - void - insert_equal(_ForwardIterator __f, _ForwardIterator __l, - forward_iterator_tag) - { - size_type __n = distance(__f, __l); - resize(_M_num_elements + __n); - for ( ; __n > 0; --__n, ++__f) - insert_equal_noresize(*__f); - } - - reference - find_or_insert(const value_type& __obj); - - iterator - find(const key_type& __key) - { - size_type __n = _M_bkt_num_key(__key); - _Node* __first; - for (__first = _M_buckets[__n]; - __first && !_M_equals(_M_get_key(__first->_M_val), __key); - __first = __first->_M_next) - { } - return iterator(__first, this); - } - - const_iterator - find(const key_type& __key) const - { - size_type __n = _M_bkt_num_key(__key); - const _Node* __first; - for (__first = _M_buckets[__n]; - __first && !_M_equals(_M_get_key(__first->_M_val), __key); - __first = __first->_M_next) - { } - return const_iterator(__first, this); - } - - size_type - count(const key_type& __key) const - { - const size_type __n = _M_bkt_num_key(__key); - size_type __result = 0; - - for (const _Node* __cur = _M_buckets[__n]; __cur; - __cur = __cur->_M_next) - if (_M_equals(_M_get_key(__cur->_M_val), __key)) - ++__result; - return __result; - } - - pair - equal_range(const key_type& __key); - - pair - equal_range(const key_type& __key) const; - - size_type - erase(const key_type& __key); - - void - erase(const iterator& __it); - - void - erase(iterator __first, iterator __last); - - void - erase(const const_iterator& __it); - - void - erase(const_iterator __first, const_iterator __last); - - void - resize(size_type __num_elements_hint); - - void - clear(); - - private: - size_type - _M_next_size(size_type __n) const - { return __stl_next_prime(__n); } - - void - _M_initialize_buckets(size_type __n) - { - const size_type __n_buckets = _M_next_size(__n); - _M_buckets.reserve(__n_buckets); - _M_buckets.insert(_M_buckets.end(), __n_buckets, (_Node*) 0); - _M_num_elements = 0; - __profcxx_hashtable_construct(this, __n_buckets); - __profcxx_hashtable_construct2(this); - } - - size_type - _M_bkt_num_key(const key_type& __key) const - { return _M_bkt_num_key(__key, _M_buckets.size()); } - - size_type - _M_bkt_num(const value_type& __obj) const - { return _M_bkt_num_key(_M_get_key(__obj)); } - - size_type - _M_bkt_num_key(const key_type& __key, size_t __n) const - { return _M_hash(__key) % __n; } - - size_type - _M_bkt_num(const value_type& __obj, size_t __n) const - { return _M_bkt_num_key(_M_get_key(__obj), __n); } - - _Node* - _M_new_node(const value_type& __obj) - { - _Node* __n = _M_get_node(); - __n->_M_next = 0; - try - { - this->get_allocator().construct(&__n->_M_val, __obj); - return __n; - } - catch(...) - { - _M_put_node(__n); - __throw_exception_again; - } - } - - void - _M_delete_node(_Node* __n) - { - this->get_allocator().destroy(&__n->_M_val); - _M_put_node(__n); - } - - void - _M_erase_bucket(const size_type __n, _Node* __first, _Node* __last); - - void - _M_erase_bucket(const size_type __n, _Node* __last); - - void - _M_copy_from(const hashtable& __ht); - }; - - template - _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>& - _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>:: - operator++() - { - const _Node* __old = _M_cur; - _M_cur = _M_cur->_M_next; - if (!_M_cur) - { - size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val); - while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size()) - _M_cur = _M_ht->_M_buckets[__bucket]; - } - return *this; - } - - template - inline _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All> - _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>:: - operator++(int) - { - iterator __tmp = *this; - ++*this; - return __tmp; - } - - template - _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>& - _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>:: - operator++() - { - const _Node* __old = _M_cur; - _M_cur = _M_cur->_M_next; - if (!_M_cur) - { - size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val); - while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size()) - _M_cur = _M_ht->_M_buckets[__bucket]; - } - return *this; - } - - template - inline _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All> - _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>:: - operator++(int) - { - const_iterator __tmp = *this; - ++*this; - return __tmp; - } - - template - bool - operator==(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1, - const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2) - { - typedef typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::_Node _Node; - - if (__ht1._M_buckets.size() != __ht2._M_buckets.size()) - return false; - - for (size_t __n = 0; __n < __ht1._M_buckets.size(); ++__n) - { - _Node* __cur1 = __ht1._M_buckets[__n]; - _Node* __cur2 = __ht2._M_buckets[__n]; - // Check same length of lists - for (; __cur1 && __cur2; - __cur1 = __cur1->_M_next, __cur2 = __cur2->_M_next) - { } - if (__cur1 || __cur2) - return false; - // Now check one's elements are in the other - for (__cur1 = __ht1._M_buckets[__n] ; __cur1; - __cur1 = __cur1->_M_next) - { - bool _found__cur1 = false; - for (__cur2 = __ht2._M_buckets[__n]; - __cur2; __cur2 = __cur2->_M_next) - { - if (__cur1->_M_val == __cur2->_M_val) - { - _found__cur1 = true; - break; - } - } - if (!_found__cur1) - return false; - } - } - return true; - } - - template - inline bool - operator!=(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1, - const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2) - { return !(__ht1 == __ht2); } - - template - inline void - swap(hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht1, - hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht2) - { __ht1.swap(__ht2); } - - template - pair::iterator, bool> - hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>:: - insert_unique_noresize(const value_type& __obj) - { - const size_type __n = _M_bkt_num(__obj); - _Node* __first = _M_buckets[__n]; - - for (_Node* __cur = __first; __cur; __cur = __cur->_M_next) - if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj))) - return pair(iterator(__cur, this), false); - - _Node* __tmp = _M_new_node(__obj); - __tmp->_M_next = __first; - _M_buckets[__n] = __tmp; - ++_M_num_elements; - return pair(iterator(__tmp, this), true); - } - - template - typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator - hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>:: - insert_equal_noresize(const value_type& __obj) - { - const size_type __n = _M_bkt_num(__obj); - _Node* __first = _M_buckets[__n]; - - for (_Node* __cur = __first; __cur; __cur = __cur->_M_next) - if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj))) - { - _Node* __tmp = _M_new_node(__obj); - __tmp->_M_next = __cur->_M_next; - __cur->_M_next = __tmp; - ++_M_num_elements; - return iterator(__tmp, this); - } - - _Node* __tmp = _M_new_node(__obj); - __tmp->_M_next = __first; - _M_buckets[__n] = __tmp; - ++_M_num_elements; - return iterator(__tmp, this); - } - - template - typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::reference - hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>:: - find_or_insert(const value_type& __obj) - { - resize(_M_num_elements + 1); - - size_type __n = _M_bkt_num(__obj); - _Node* __first = _M_buckets[__n]; - - for (_Node* __cur = __first; __cur; __cur = __cur->_M_next) - if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj))) - return __cur->_M_val; - - _Node* __tmp = _M_new_node(__obj); - __tmp->_M_next = __first; - _M_buckets[__n] = __tmp; - ++_M_num_elements; - return __tmp->_M_val; - } - - template - pair::iterator, - typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator> - hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>:: - equal_range(const key_type& __key) - { - typedef pair _Pii; - const size_type __n = _M_bkt_num_key(__key); - - for (_Node* __first = _M_buckets[__n]; __first; - __first = __first->_M_next) - if (_M_equals(_M_get_key(__first->_M_val), __key)) - { - for (_Node* __cur = __first->_M_next; __cur; - __cur = __cur->_M_next) - if (!_M_equals(_M_get_key(__cur->_M_val), __key)) - return _Pii(iterator(__first, this), iterator(__cur, this)); - for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m) - if (_M_buckets[__m]) - return _Pii(iterator(__first, this), - iterator(_M_buckets[__m], this)); - return _Pii(iterator(__first, this), end()); - } - return _Pii(end(), end()); - } - - template - pair::const_iterator, - typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::const_iterator> - hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>:: - equal_range(const key_type& __key) const - { - typedef pair _Pii; - const size_type __n = _M_bkt_num_key(__key); - - for (const _Node* __first = _M_buckets[__n]; __first; - __first = __first->_M_next) - { - if (_M_equals(_M_get_key(__first->_M_val), __key)) - { - for (const _Node* __cur = __first->_M_next; __cur; - __cur = __cur->_M_next) - if (!_M_equals(_M_get_key(__cur->_M_val), __key)) - return _Pii(const_iterator(__first, this), - const_iterator(__cur, this)); - for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m) - if (_M_buckets[__m]) - return _Pii(const_iterator(__first, this), - const_iterator(_M_buckets[__m], this)); - return _Pii(const_iterator(__first, this), end()); - } - } - return _Pii(end(), end()); - } - - template - typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::size_type - hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>:: - erase(const key_type& __key) - { - const size_type __n = _M_bkt_num_key(__key); - _Node* __first = _M_buckets[__n]; - size_type __erased = 0; - - if (__first) - { - _Node* __cur = __first; - _Node* __next = __cur->_M_next; - while (__next) - { - if (_M_equals(_M_get_key(__next->_M_val), __key)) - { - __cur->_M_next = __next->_M_next; - _M_delete_node(__next); - __next = __cur->_M_next; - ++__erased; - --_M_num_elements; - } - else - { - __cur = __next; - __next = __cur->_M_next; - } - } - if (_M_equals(_M_get_key(__first->_M_val), __key)) - { - _M_buckets[__n] = __first->_M_next; - _M_delete_node(__first); - ++__erased; - --_M_num_elements; - } - } - return __erased; - } - - template - void hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>:: - erase(const iterator& __it) - { - _Node* __p = __it._M_cur; - if (__p) - { - const size_type __n = _M_bkt_num(__p->_M_val); - _Node* __cur = _M_buckets[__n]; - - if (__cur == __p) - { - _M_buckets[__n] = __cur->_M_next; - _M_delete_node(__cur); - --_M_num_elements; - } - else - { - _Node* __next = __cur->_M_next; - while (__next) - { - if (__next == __p) - { - __cur->_M_next = __next->_M_next; - _M_delete_node(__next); - --_M_num_elements; - break; - } - else - { - __cur = __next; - __next = __cur->_M_next; - } - } - } - } - } - - template - void - hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>:: - erase(iterator __first, iterator __last) - { - size_type __f_bucket = __first._M_cur ? _M_bkt_num(__first._M_cur->_M_val) - : _M_buckets.size(); - - size_type __l_bucket = __last._M_cur ? _M_bkt_num(__last._M_cur->_M_val) - : _M_buckets.size(); - - if (__first._M_cur == __last._M_cur) - return; - else if (__f_bucket == __l_bucket) - _M_erase_bucket(__f_bucket, __first._M_cur, __last._M_cur); - else - { - _M_erase_bucket(__f_bucket, __first._M_cur, 0); - for (size_type __n = __f_bucket + 1; __n < __l_bucket; ++__n) - _M_erase_bucket(__n, 0); - if (__l_bucket != _M_buckets.size()) - _M_erase_bucket(__l_bucket, __last._M_cur); - } - } - - template - inline void - hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>:: - erase(const_iterator __first, const_iterator __last) - { - erase(iterator(const_cast<_Node*>(__first._M_cur), - const_cast(__first._M_ht)), - iterator(const_cast<_Node*>(__last._M_cur), - const_cast(__last._M_ht))); - } - - template - inline void - hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>:: - erase(const const_iterator& __it) - { erase(iterator(const_cast<_Node*>(__it._M_cur), - const_cast(__it._M_ht))); } - - template - void - hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>:: - resize(size_type __num_elements_hint) - { - const size_type __old_n = _M_buckets.size(); - if (__num_elements_hint > __old_n) - { - const size_type __n = _M_next_size(__num_elements_hint); - if (__n > __old_n) - { - _Vector_type __tmp(__n, (_Node*)(0), _M_buckets.get_allocator()); - try - { - for (size_type __bucket = 0; __bucket < __old_n; ++__bucket) - { - _Node* __first = _M_buckets[__bucket]; - while (__first) - { - size_type __new_bucket = _M_bkt_num(__first->_M_val, - __n); - _M_buckets[__bucket] = __first->_M_next; - __first->_M_next = __tmp[__new_bucket]; - __tmp[__new_bucket] = __first; - __first = _M_buckets[__bucket]; - } - } - _M_buckets.swap(__tmp); - } - catch(...) - { - for (size_type __bucket = 0; __bucket < __tmp.size(); - ++__bucket) - { - while (__tmp[__bucket]) - { - _Node* __next = __tmp[__bucket]->_M_next; - _M_delete_node(__tmp[__bucket]); - __tmp[__bucket] = __next; - } - } - __throw_exception_again; - } - __profcxx_hashtable_resize(this, __num_elements_hint, __n); - } - } - } - - template - void - hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>:: - _M_erase_bucket(const size_type __n, _Node* __first, _Node* __last) - { - _Node* __cur = _M_buckets[__n]; - if (__cur == __first) - _M_erase_bucket(__n, __last); - else - { - _Node* __next; - for (__next = __cur->_M_next; - __next != __first; - __cur = __next, __next = __cur->_M_next) - ; - while (__next != __last) - { - __cur->_M_next = __next->_M_next; - _M_delete_node(__next); - __next = __cur->_M_next; - --_M_num_elements; - } - } - } - - template - void - hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>:: - _M_erase_bucket(const size_type __n, _Node* __last) - { - _Node* __cur = _M_buckets[__n]; - while (__cur != __last) - { - _Node* __next = __cur->_M_next; - _M_delete_node(__cur); - __cur = __next; - _M_buckets[__n] = __cur; - --_M_num_elements; - } - } - - template - void - hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>:: - clear() - { - size_type __hops=0, __lc = 0, __chain = 0; - if (_M_num_elements != 0) - __profcxx_hashtable_destruct(this, _M_buckets.size(), _M_num_elements); - - for (size_type __i = 0; __i < _M_buckets.size(); ++__i) - { - _Node* __cur = _M_buckets[__i]; - while (__cur != 0) - { - _Node* __next = __cur->_M_next; - _M_delete_node(__cur); - __cur = __next; - - // Compute the longest chain count. - __chain++; - } - _M_buckets[__i] = 0; - - // Collect number of hops. - if (__chain > 1) { - __lc = __lc > __chain ? __lc : __chain; - __hops += (__chain-1) * __chain / 2; - } - __chain = 0; - } - if (_M_num_elements) { - __profcxx_hashtable_destruct2(this, __lc, _M_num_elements, __hops); - } - _M_num_elements = 0; - } - - template - void - hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>:: - _M_copy_from(const hashtable& __ht) - { - _M_buckets.clear(); - _M_buckets.reserve(__ht._M_buckets.size()); - _M_buckets.insert(_M_buckets.end(), __ht._M_buckets.size(), (_Node*) 0); - try - { - for (size_type __i = 0; __i < __ht._M_buckets.size(); ++__i) { - const _Node* __cur = __ht._M_buckets[__i]; - if (__cur) - { - _Node* __local_copy = _M_new_node(__cur->_M_val); - _M_buckets[__i] = __local_copy; - - for (_Node* __next = __cur->_M_next; - __next; - __cur = __next, __next = __cur->_M_next) - { - __local_copy->_M_next = _M_new_node(__next->_M_val); - __local_copy = __local_copy->_M_next; - } - } - } - _M_num_elements = __ht._M_num_elements; - } - catch(...) - { - clear(); - __throw_exception_again; - } - } - -_GLIBCXX_END_NAMESPACE - -#endif diff --git a/libstdc++-v3/include/std/iostream b/libstdc++-v3/include/std/iostream index 9e7d5027c72..e14c4f36632 100644 --- a/libstdc++-v3/include/std/iostream +++ b/libstdc++-v3/include/std/iostream @@ -55,16 +55,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * termination. For more information, see the HOWTO linked to above. */ //@{ - extern _GLIBCXX_IMPORT istream cin; ///< Linked to standard input - extern _GLIBCXX_IMPORT ostream cout; ///< Linked to standard output - extern _GLIBCXX_IMPORT ostream cerr; ///< Linked to standard error (unbuffered) - extern _GLIBCXX_IMPORT ostream clog; ///< Linked to standard error (buffered) + extern istream cin; ///< Linked to standard input + extern ostream cout; ///< Linked to standard output + extern ostream cerr; ///< Linked to standard error (unbuffered) + extern ostream clog; ///< Linked to standard error (buffered) #ifdef _GLIBCXX_USE_WCHAR_T - extern _GLIBCXX_IMPORT wistream wcin; ///< Linked to standard input - extern _GLIBCXX_IMPORT wostream wcout; ///< Linked to standard output - extern _GLIBCXX_IMPORT wostream wcerr; ///< Linked to standard error (unbuffered) - extern _GLIBCXX_IMPORT wostream wclog; ///< Linked to standard error (buffered) + extern wistream wcin; ///< Linked to standard input + extern wostream wcout; ///< Linked to standard output + extern wostream wcerr; ///< Linked to standard error (unbuffered) + extern wostream wclog; ///< Linked to standard error (buffered) #endif //@} diff --git a/libstdc++-v3/include/std/stdexcept b/libstdc++-v3/include/std/stdexcept index 1d1db62f08c..9f5c9761c66 100644 --- a/libstdc++-v3/include/std/stdexcept +++ b/libstdc++-v3/include/std/stdexcept @@ -50,7 +50,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * program runs (e.g., violations of class invariants). * @brief One of two subclasses of exception. */ - class _GLIBCXX_IMPORT logic_error : public exception + class logic_error : public exception { string _M_msg; @@ -70,14 +70,14 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /** Thrown by the library, or by you, to report domain errors (domain in * the mathematical sense). */ - class _GLIBCXX_IMPORT domain_error : public logic_error + class domain_error : public logic_error { public: explicit domain_error(const string& __arg); }; /** Thrown to report invalid arguments to functions. */ - class _GLIBCXX_IMPORT invalid_argument : public logic_error + class invalid_argument : public logic_error { public: explicit invalid_argument(const string& __arg); @@ -85,7 +85,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /** Thrown when an object is constructed that would exceed its maximum * permitted size (e.g., a basic_string instance). */ - class _GLIBCXX_IMPORT length_error : public logic_error + class length_error : public logic_error { public: explicit length_error(const string& __arg); @@ -93,7 +93,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /** This represents an argument whose value is not within the expected * range (e.g., boundary checks in basic_string). */ - class _GLIBCXX_IMPORT out_of_range : public logic_error + class out_of_range : public logic_error { public: explicit out_of_range(const string& __arg); @@ -104,7 +104,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * the program executes. * @brief One of two subclasses of exception. */ - class _GLIBCXX_IMPORT runtime_error : public exception + class runtime_error : public exception { string _M_msg; @@ -123,7 +123,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) }; /** Thrown to indicate range errors in internal computations. */ - class _GLIBCXX_IMPORT range_error : public runtime_error + class range_error : public runtime_error { public: explicit range_error(const string& __arg); @@ -137,7 +137,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) }; /** Thrown to indicate arithmetic underflow. */ - class _GLIBCXX_IMPORT underflow_error : public runtime_error + class underflow_error : public runtime_error { public: explicit underflow_error(const string& __arg); diff --git a/libstdc++-v3/libsupc++/exception b/libstdc++-v3/libsupc++/exception index a8aec4250f5..989a9ff6f74 100644 --- a/libstdc++-v3/libsupc++/exception +++ b/libstdc++-v3/libsupc++/exception @@ -56,7 +56,7 @@ namespace std * your own %exception classes, or use a different hierarchy, or to * throw non-class data (e.g., fundamental types). */ - class _GLIBCXX_IMPORT exception + class exception { public: exception() throw() { } @@ -69,7 +69,7 @@ namespace std /** If an %exception is thrown which is not listed in a function's * %exception specification, one of these may be thrown. */ - class _GLIBCXX_IMPORT bad_exception : public exception + class bad_exception : public exception { public: bad_exception() throw() { } diff --git a/libstdc++-v3/libsupc++/new b/libstdc++-v3/libsupc++/new index f99f8a6e212..d4115020204 100644 --- a/libstdc++-v3/libsupc++/new +++ b/libstdc++-v3/libsupc++/new @@ -51,7 +51,7 @@ namespace std * * @c bad_alloc (or classes derived from it) is used to report allocation * errors from the throwing forms of @c new. */ - class _GLIBCXX_IMPORT bad_alloc : public exception + class bad_alloc : public exception { public: bad_alloc() throw() { } diff --git a/libstdc++-v3/libsupc++/typeinfo b/libstdc++-v3/libsupc++/typeinfo index 443ba7e31ba..f7f9d4e2cc2 100644 --- a/libstdc++-v3/libsupc++/typeinfo +++ b/libstdc++-v3/libsupc++/typeinfo @@ -82,7 +82,7 @@ namespace std * The @c type_info class describes type information generated by * an implementation. */ - class _GLIBCXX_IMPORT type_info + class type_info { public: /** Destructor first. Being the first non-inline virtual function, this @@ -169,7 +169,7 @@ namespace std * * If you attempt an invalid @c dynamic_cast expression, an instance of * this class (or something derived from this class) is thrown. */ - class _GLIBCXX_IMPORT bad_cast : public exception + class bad_cast : public exception { public: bad_cast() throw() { } @@ -186,7 +186,7 @@ namespace std * @brief Thrown when a NULL pointer in a @c typeid expression is used. * @ingroup exceptions */ - class _GLIBCXX_IMPORT bad_typeid : public exception + class bad_typeid : public exception { public: bad_typeid () throw() { } diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am index 56260f6a26f..4306dd5c7c2 100644 --- a/libstdc++-v3/src/Makefile.am +++ b/libstdc++-v3/src/Makefile.am @@ -207,8 +207,7 @@ libstdc___la_DEPENDENCIES = \ $(top_builddir)/libsupc++/libsupc++convenience.la libstdc___la_LDFLAGS = \ - -version-info $(libtool_VERSION) ${version_arg} -lm \ - -no-undefined -bindir $(bindir) + -version-info $(libtool_VERSION) ${version_arg} -lm libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in index c2e4a4e741d..a2eb4770d70 100644 --- a/libstdc++-v3/src/Makefile.in +++ b/libstdc++-v3/src/Makefile.in @@ -444,8 +444,7 @@ libstdc___la_DEPENDENCIES = \ $(top_builddir)/libsupc++/libsupc++convenience.la libstdc___la_LDFLAGS = \ - -version-info $(libtool_VERSION) ${version_arg} -lm \ - -no-undefined -bindir $(bindir) + -version-info $(libtool_VERSION) ${version_arg} -lm libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index c0683f0e876..45a43dea5fd 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -124,9 +124,6 @@ proc libstdc++_init { testfile } { if { [string match "powerpc-*-darwin*" $target_triplet] } { append DEFAULT_CXXFLAGS " -multiply_defined suppress" } - if { [string match "*-*-cygwin*" $target_triplet] } { - append DEFAULT_CXXFLAGS " -Wl,--enable-auto-import" - } } v3track DEFAULT_CXXFLAGS 2 @@ -147,9 +144,6 @@ proc libstdc++_init { testfile } { set gccdir [file dirname $gccdir] append ld_library_path_tmp ":${gccdir}" } - if { [string match "*-*-cygwin*" $target_triplet] } { - append ld_library_path_tmp ":${blddir}/../libgcc" - } v3track gccdir 3 # Locate libgomp. This is only required for parallel mode. -- cgit v1.2.3