163d1a8abSmrg // Compatibility symbols for previous versions -*- C++ -*-
263d1a8abSmrg
3*ec02198aSmrg // Copyright (C) 2005-2020 Free Software Foundation, Inc.
463d1a8abSmrg //
563d1a8abSmrg // This file is part of the GNU ISO C++ Library. This library is free
663d1a8abSmrg // software; you can redistribute it and/or modify it under the
763d1a8abSmrg // terms of the GNU General Public License as published by the
863d1a8abSmrg // Free Software Foundation; either version 3, or (at your option)
963d1a8abSmrg // any later version.
1063d1a8abSmrg
1163d1a8abSmrg // This library is distributed in the hope that it will be useful,
1263d1a8abSmrg // but WITHOUT ANY WARRANTY; without even the implied warranty of
1363d1a8abSmrg // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1463d1a8abSmrg // GNU General Public License for more details.
1563d1a8abSmrg
1663d1a8abSmrg // Under Section 7 of GPL version 3, you are granted additional
1763d1a8abSmrg // permissions described in the GCC Runtime Library Exception, version
1863d1a8abSmrg // 3.1, as published by the Free Software Foundation.
1963d1a8abSmrg
2063d1a8abSmrg // You should have received a copy of the GNU General Public License and
2163d1a8abSmrg // a copy of the GCC Runtime Library Exception along with this program;
2263d1a8abSmrg // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
2363d1a8abSmrg // <http://www.gnu.org/licenses/>.
2463d1a8abSmrg
2563d1a8abSmrg #define _GLIBCXX_USE_CXX11_ABI 0
2663d1a8abSmrg #include <bits/c++config.h>
2763d1a8abSmrg
2863d1a8abSmrg #if defined(_GLIBCXX_SYMVER_GNU) && defined(_GLIBCXX_SHARED) \
2963d1a8abSmrg && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE)\
3063d1a8abSmrg && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT)
3163d1a8abSmrg #define istreambuf_iterator istreambuf_iteratorXX
3263d1a8abSmrg #define basic_fstream basic_fstreamXX
3363d1a8abSmrg #define basic_ifstream basic_ifstreamXX
3463d1a8abSmrg #define basic_ofstream basic_ofstreamXX
3563d1a8abSmrg #define _M_copy(a, b, c) _M_copyXX(a, b, c)
3663d1a8abSmrg #define _M_move(a, b, c) _M_moveXX(a, b, c)
3763d1a8abSmrg #define _M_assign(a, b, c) _M_assignXX(a, b, c)
3863d1a8abSmrg #define _M_disjunct(a) _M_disjunctXX(a)
3963d1a8abSmrg #define _M_check_length(a, b, c) _M_check_lengthXX(a, b, c)
4063d1a8abSmrg #define _M_set_length_and_sharable(a) _M_set_length_and_sharableXX(a)
4163d1a8abSmrg #define ignore ignoreXX
4263d1a8abSmrg #define eq eqXX
4363d1a8abSmrg #define _List_node_base _List_node_baseXX
4463d1a8abSmrg #endif
4563d1a8abSmrg
4663d1a8abSmrg #include <string>
4763d1a8abSmrg #include <istream>
4863d1a8abSmrg #include <fstream>
4963d1a8abSmrg #include <sstream>
5063d1a8abSmrg #include <cmath>
5163d1a8abSmrg #include <ext/numeric_traits.h>
5263d1a8abSmrg
5363d1a8abSmrg namespace std _GLIBCXX_VISIBILITY(default)
5463d1a8abSmrg {
5563d1a8abSmrg _GLIBCXX_BEGIN_NAMESPACE_VERSION
5663d1a8abSmrg
5763d1a8abSmrg // std::istream ignore explicit specializations.
5863d1a8abSmrg template<>
5963d1a8abSmrg basic_istream<char>&
6063d1a8abSmrg basic_istream<char>::
ignore(streamsize __n)6163d1a8abSmrg ignore(streamsize __n)
6263d1a8abSmrg {
6363d1a8abSmrg if (__n == 1)
6463d1a8abSmrg return ignore();
6563d1a8abSmrg
6663d1a8abSmrg _M_gcount = 0;
6763d1a8abSmrg sentry __cerb(*this, true);
6863d1a8abSmrg if ( __n > 0 && __cerb)
6963d1a8abSmrg {
7063d1a8abSmrg ios_base::iostate __err = ios_base::goodbit;
7163d1a8abSmrg __try
7263d1a8abSmrg {
7363d1a8abSmrg const int_type __eof = traits_type::eof();
7463d1a8abSmrg __streambuf_type* __sb = this->rdbuf();
7563d1a8abSmrg int_type __c = __sb->sgetc();
7663d1a8abSmrg
7763d1a8abSmrg // See comment in istream.tcc.
7863d1a8abSmrg bool __large_ignore = false;
7963d1a8abSmrg while (true)
8063d1a8abSmrg {
8163d1a8abSmrg while (_M_gcount < __n
8263d1a8abSmrg && !traits_type::eq_int_type(__c, __eof))
8363d1a8abSmrg {
8463d1a8abSmrg streamsize __size = std::min(streamsize(__sb->egptr()
8563d1a8abSmrg - __sb->gptr()),
8663d1a8abSmrg streamsize(__n - _M_gcount));
8763d1a8abSmrg if (__size > 1)
8863d1a8abSmrg {
8963d1a8abSmrg __sb->__safe_gbump(__size);
9063d1a8abSmrg _M_gcount += __size;
9163d1a8abSmrg __c = __sb->sgetc();
9263d1a8abSmrg }
9363d1a8abSmrg else
9463d1a8abSmrg {
9563d1a8abSmrg ++_M_gcount;
9663d1a8abSmrg __c = __sb->snextc();
9763d1a8abSmrg }
9863d1a8abSmrg }
9963d1a8abSmrg if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max
10063d1a8abSmrg && !traits_type::eq_int_type(__c, __eof))
10163d1a8abSmrg {
10263d1a8abSmrg _M_gcount =
10363d1a8abSmrg __gnu_cxx::__numeric_traits<streamsize>::__min;
10463d1a8abSmrg __large_ignore = true;
10563d1a8abSmrg }
10663d1a8abSmrg else
10763d1a8abSmrg break;
10863d1a8abSmrg }
10963d1a8abSmrg
11063d1a8abSmrg if (__large_ignore)
11163d1a8abSmrg _M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max;
11263d1a8abSmrg
11363d1a8abSmrg if (traits_type::eq_int_type(__c, __eof))
11463d1a8abSmrg __err |= ios_base::eofbit;
11563d1a8abSmrg }
11663d1a8abSmrg __catch(__cxxabiv1::__forced_unwind&)
11763d1a8abSmrg {
11863d1a8abSmrg this->_M_setstate(ios_base::badbit);
11963d1a8abSmrg __throw_exception_again;
12063d1a8abSmrg }
12163d1a8abSmrg __catch(...)
12263d1a8abSmrg { this->_M_setstate(ios_base::badbit); }
12363d1a8abSmrg if (__err)
12463d1a8abSmrg this->setstate(__err);
12563d1a8abSmrg }
12663d1a8abSmrg return *this;
12763d1a8abSmrg }
12863d1a8abSmrg
12963d1a8abSmrg #ifdef _GLIBCXX_USE_WCHAR_T
13063d1a8abSmrg template<>
13163d1a8abSmrg basic_istream<wchar_t>&
13263d1a8abSmrg basic_istream<wchar_t>::
ignore(streamsize __n)13363d1a8abSmrg ignore(streamsize __n)
13463d1a8abSmrg {
13563d1a8abSmrg if (__n == 1)
13663d1a8abSmrg return ignore();
13763d1a8abSmrg
13863d1a8abSmrg _M_gcount = 0;
13963d1a8abSmrg sentry __cerb(*this, true);
14063d1a8abSmrg if (__n > 0 && __cerb)
14163d1a8abSmrg {
14263d1a8abSmrg ios_base::iostate __err = ios_base::goodbit;
14363d1a8abSmrg __try
14463d1a8abSmrg {
14563d1a8abSmrg const int_type __eof = traits_type::eof();
14663d1a8abSmrg __streambuf_type* __sb = this->rdbuf();
14763d1a8abSmrg int_type __c = __sb->sgetc();
14863d1a8abSmrg
14963d1a8abSmrg bool __large_ignore = false;
15063d1a8abSmrg while (true)
15163d1a8abSmrg {
15263d1a8abSmrg while (_M_gcount < __n
15363d1a8abSmrg && !traits_type::eq_int_type(__c, __eof))
15463d1a8abSmrg {
15563d1a8abSmrg streamsize __size = std::min(streamsize(__sb->egptr()
15663d1a8abSmrg - __sb->gptr()),
15763d1a8abSmrg streamsize(__n - _M_gcount));
15863d1a8abSmrg if (__size > 1)
15963d1a8abSmrg {
16063d1a8abSmrg __sb->__safe_gbump(__size);
16163d1a8abSmrg _M_gcount += __size;
16263d1a8abSmrg __c = __sb->sgetc();
16363d1a8abSmrg }
16463d1a8abSmrg else
16563d1a8abSmrg {
16663d1a8abSmrg ++_M_gcount;
16763d1a8abSmrg __c = __sb->snextc();
16863d1a8abSmrg }
16963d1a8abSmrg }
17063d1a8abSmrg if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max
17163d1a8abSmrg && !traits_type::eq_int_type(__c, __eof))
17263d1a8abSmrg {
17363d1a8abSmrg _M_gcount =
17463d1a8abSmrg __gnu_cxx::__numeric_traits<streamsize>::__min;
17563d1a8abSmrg __large_ignore = true;
17663d1a8abSmrg }
17763d1a8abSmrg else
17863d1a8abSmrg break;
17963d1a8abSmrg }
18063d1a8abSmrg
18163d1a8abSmrg if (__large_ignore)
18263d1a8abSmrg _M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max;
18363d1a8abSmrg
18463d1a8abSmrg if (traits_type::eq_int_type(__c, __eof))
18563d1a8abSmrg __err |= ios_base::eofbit;
18663d1a8abSmrg }
18763d1a8abSmrg __catch(__cxxabiv1::__forced_unwind&)
18863d1a8abSmrg {
18963d1a8abSmrg this->_M_setstate(ios_base::badbit);
19063d1a8abSmrg __throw_exception_again;
19163d1a8abSmrg }
19263d1a8abSmrg __catch(...)
19363d1a8abSmrg { this->_M_setstate(ios_base::badbit); }
19463d1a8abSmrg if (__err)
19563d1a8abSmrg this->setstate(__err);
19663d1a8abSmrg }
19763d1a8abSmrg return *this;
19863d1a8abSmrg }
19963d1a8abSmrg #endif
20063d1a8abSmrg
20163d1a8abSmrg _GLIBCXX_END_NAMESPACE_VERSION
20263d1a8abSmrg } // namespace std
20363d1a8abSmrg
20463d1a8abSmrg
20563d1a8abSmrg // NB: These symbols renames should go into the shared library only,
20663d1a8abSmrg // and only those shared libraries that support versioning.
20763d1a8abSmrg #if defined(_GLIBCXX_SYMVER_GNU) && defined(_GLIBCXX_SHARED) \
20863d1a8abSmrg && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \
20963d1a8abSmrg && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT)
21063d1a8abSmrg
21163d1a8abSmrg /* gcc-3.4.4
21263d1a8abSmrg _ZNSt19istreambuf_iteratorIcSt11char_traitsIcEEppEv
21363d1a8abSmrg _ZNSt19istreambuf_iteratorIwSt11char_traitsIwEEppEv
21463d1a8abSmrg */
21563d1a8abSmrg
21663d1a8abSmrg namespace std _GLIBCXX_VISIBILITY(default)
21763d1a8abSmrg {
21863d1a8abSmrg _GLIBCXX_BEGIN_NAMESPACE_VERSION
21963d1a8abSmrg
22063d1a8abSmrg template
22163d1a8abSmrg istreambuf_iterator<char>&
22263d1a8abSmrg istreambuf_iterator<char>::operator++();
22363d1a8abSmrg
22463d1a8abSmrg #ifdef _GLIBCXX_USE_WCHAR_T
22563d1a8abSmrg template
22663d1a8abSmrg istreambuf_iterator<wchar_t>&
22763d1a8abSmrg istreambuf_iterator<wchar_t>::operator++();
22863d1a8abSmrg #endif
22963d1a8abSmrg
23063d1a8abSmrg _GLIBCXX_END_NAMESPACE_VERSION
23163d1a8abSmrg } // namespace std
23263d1a8abSmrg
23363d1a8abSmrg
23463d1a8abSmrg /* gcc-4.0.0
23563d1a8abSmrg _ZNSs4_Rep26_M_set_length_and_sharableEj
23663d1a8abSmrg _ZNSs7_M_copyEPcPKcj
23763d1a8abSmrg _ZNSs7_M_moveEPcPKcj
23863d1a8abSmrg _ZNSs9_M_assignEPcjc
23963d1a8abSmrg _ZNKSs11_M_disjunctEPKc
24063d1a8abSmrg _ZNKSs15_M_check_lengthEjjPKc
24163d1a8abSmrg _ZNSbIwSt11char_traitsIwESaIwEE4_Rep26_M_set_length_and_sharableEj
24263d1a8abSmrg _ZNSbIwSt11char_traitsIwESaIwEE7_M_copyEPwPKwj
24363d1a8abSmrg _ZNSbIwSt11char_traitsIwESaIwEE7_M_moveEPwPKwj
24463d1a8abSmrg _ZNSbIwSt11char_traitsIwESaIwEE9_M_assignEPwjw
24563d1a8abSmrg _ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw
24663d1a8abSmrg _ZNKSbIwSt11char_traitsIwESaIwEE15_M_check_lengthEjjPKc
24763d1a8abSmrg
24863d1a8abSmrg _ZNKSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv
24963d1a8abSmrg _ZNKSt13basic_fstreamIwSt11char_traitsIwEE7is_openEv
25063d1a8abSmrg _ZNKSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv
25163d1a8abSmrg _ZNKSt14basic_ifstreamIwSt11char_traitsIwEE7is_openEv
25263d1a8abSmrg _ZNKSt14basic_ofstreamIcSt11char_traitsIcEE7is_openEv
25363d1a8abSmrg _ZNKSt14basic_ofstreamIwSt11char_traitsIwEE7is_openEv
25463d1a8abSmrg
25563d1a8abSmrg _ZNSi6ignoreEi
25663d1a8abSmrg _ZNSi6ignoreEv
25763d1a8abSmrg _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEi
25863d1a8abSmrg _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEv
25963d1a8abSmrg
26063d1a8abSmrg _ZNSt11char_traitsIcE2eqERKcS2_
26163d1a8abSmrg _ZNSt11char_traitsIwE2eqERKwS2_
26263d1a8abSmrg */
26363d1a8abSmrg namespace std _GLIBCXX_VISIBILITY(default)
26463d1a8abSmrg {
26563d1a8abSmrg _GLIBCXX_BEGIN_NAMESPACE_VERSION
26663d1a8abSmrg
26763d1a8abSmrg // std::char_traits is explicitly specialized
26863d1a8abSmrg bool (* __p1)(const char&, const char&) = &char_traits<char>::eq;
26963d1a8abSmrg
27063d1a8abSmrg // std::string
27163d1a8abSmrg template
27263d1a8abSmrg void
27363d1a8abSmrg basic_string<char>::_M_copy(char*, const char*, size_t);
27463d1a8abSmrg
27563d1a8abSmrg template
27663d1a8abSmrg void
27763d1a8abSmrg basic_string<char>::_M_move(char*, const char*, size_t);
27863d1a8abSmrg
27963d1a8abSmrg template
28063d1a8abSmrg void
28163d1a8abSmrg basic_string<char>::_M_assign(char*, size_t, char);
28263d1a8abSmrg
28363d1a8abSmrg template
28463d1a8abSmrg bool
28563d1a8abSmrg basic_string<char>::_M_disjunct(const char*) const;
28663d1a8abSmrg
28763d1a8abSmrg template
28863d1a8abSmrg void
28963d1a8abSmrg basic_string<char>::_M_check_length(size_t, size_t, const char*) const;
29063d1a8abSmrg
29163d1a8abSmrg template
29263d1a8abSmrg void
29363d1a8abSmrg basic_string<char>::_Rep::_M_set_length_and_sharable(size_t);
29463d1a8abSmrg
29563d1a8abSmrg
29663d1a8abSmrg // std::istream
29763d1a8abSmrg template
29863d1a8abSmrg basic_istream<char>&
29963d1a8abSmrg basic_istream<char>::ignore();
30063d1a8abSmrg
30163d1a8abSmrg template
30263d1a8abSmrg bool
30363d1a8abSmrg basic_fstream<char>::is_open() const;
30463d1a8abSmrg
30563d1a8abSmrg template
30663d1a8abSmrg bool
30763d1a8abSmrg basic_ifstream<char>::is_open() const;
30863d1a8abSmrg
30963d1a8abSmrg template
31063d1a8abSmrg bool
31163d1a8abSmrg basic_ofstream<char>::is_open() const;
31263d1a8abSmrg
31363d1a8abSmrg #ifdef _GLIBCXX_USE_WCHAR_T
31463d1a8abSmrg bool (* __p2)(const wchar_t&, const wchar_t&) = &char_traits<wchar_t>::eq;
31563d1a8abSmrg
31663d1a8abSmrg // std::wstring
31763d1a8abSmrg template
31863d1a8abSmrg void
31963d1a8abSmrg basic_string<wchar_t>::_M_copy(wchar_t*, const wchar_t*, size_t);
32063d1a8abSmrg
32163d1a8abSmrg template
32263d1a8abSmrg void
32363d1a8abSmrg basic_string<wchar_t>::_M_move(wchar_t*, const wchar_t*, size_t);
32463d1a8abSmrg
32563d1a8abSmrg template
32663d1a8abSmrg void
32763d1a8abSmrg basic_string<wchar_t>::_M_assign(wchar_t*, size_t, wchar_t);
32863d1a8abSmrg
32963d1a8abSmrg template
33063d1a8abSmrg bool
33163d1a8abSmrg basic_string<wchar_t>::_M_disjunct(const wchar_t*) const;
33263d1a8abSmrg
33363d1a8abSmrg template
33463d1a8abSmrg void
33563d1a8abSmrg basic_string<wchar_t>::_M_check_length(size_t, size_t,
33663d1a8abSmrg const char*) const;
33763d1a8abSmrg
33863d1a8abSmrg template
33963d1a8abSmrg void
34063d1a8abSmrg basic_string<wchar_t>::_Rep::_M_set_length_and_sharable(size_t);
34163d1a8abSmrg
34263d1a8abSmrg template
34363d1a8abSmrg basic_istream<wchar_t>&
34463d1a8abSmrg basic_istream<wchar_t>::ignore();
34563d1a8abSmrg
34663d1a8abSmrg template
34763d1a8abSmrg bool
34863d1a8abSmrg basic_fstream<wchar_t>::is_open() const;
34963d1a8abSmrg
35063d1a8abSmrg template
35163d1a8abSmrg bool
35263d1a8abSmrg basic_ifstream<wchar_t>::is_open() const;
35363d1a8abSmrg
35463d1a8abSmrg template
35563d1a8abSmrg bool
35663d1a8abSmrg basic_ofstream<wchar_t>::is_open() const;
35763d1a8abSmrg #endif
35863d1a8abSmrg
35963d1a8abSmrg _GLIBCXX_END_NAMESPACE_VERSION
36063d1a8abSmrg } // namespace std
36163d1a8abSmrg
36263d1a8abSmrg // The rename syntax for default exported names is
36363d1a8abSmrg // asm (".symver name1,exportedname@GLIBCXX_3.4")
36463d1a8abSmrg // asm (".symver name2,exportedname@@GLIBCXX_3.4.5")
36563d1a8abSmrg // In the future, GLIBCXX_ABI > 6 should remove all uses of
36663d1a8abSmrg // _GLIBCXX_*_SYMVER macros in this file.
36763d1a8abSmrg
36863d1a8abSmrg #ifdef _GLIBCXX_COMPAT_
36963d1a8abSmrg #define _GLIBCXX_3_4_SYMVER(XXname, name) \
37063d1a8abSmrg extern "C" void \
371c7a68eb7Smrg _X##name(...) \
37263d1a8abSmrg __attribute__ ((alias(#XXname))); \
37363d1a8abSmrg asm (".symver " "_X" #name "," #name "@GLIBCXX_3.4");
37463d1a8abSmrg
37563d1a8abSmrg #define _GLIBCXX_3_4_5_SYMVER(XXname, name) \
37663d1a8abSmrg extern "C" void \
377c7a68eb7Smrg _Y##name(...) \
37863d1a8abSmrg __attribute__ ((alias(#XXname))); \
37963d1a8abSmrg asm (".symver " "_Y" #name "," #name "@@GLIBCXX_3.4.5");
38063d1a8abSmrg
38163d1a8abSmrg #define _GLIBCXX_ASM_SYMVER(cur, old, version) \
38263d1a8abSmrg asm (".symver " #cur "," #old "@@" #version);
38363d1a8abSmrg #else
38463d1a8abSmrg #define _GLIBCXX_3_4_SYMVER(XXname, name)
38563d1a8abSmrg #define _GLIBCXX_3_4_5_SYMVER(XXname, name)
38663d1a8abSmrg #define _GLIBCXX_ASM_SYMVER(cur, old, version)
38763d1a8abSmrg #endif
38863d1a8abSmrg
38963d1a8abSmrg #define _GLIBCXX_APPLY_SYMVER _GLIBCXX_3_4_SYMVER
39063d1a8abSmrg #include <abi/compatibility.h>
39163d1a8abSmrg #undef _GLIBCXX_APPLY_SYMVER
39263d1a8abSmrg
39363d1a8abSmrg #define _GLIBCXX_APPLY_SYMVER _GLIBCXX_3_4_5_SYMVER
39463d1a8abSmrg #include <abi/compatibility.h>
39563d1a8abSmrg #undef _GLIBCXX_APPLY_SYMVER
39663d1a8abSmrg
39763d1a8abSmrg
39863d1a8abSmrg /* gcc-3.4.0
39963d1a8abSmrg _ZN10__gnu_norm15_List_node_base4hookEPS0_;
40063d1a8abSmrg _ZN10__gnu_norm15_List_node_base4swapERS0_S1_;
40163d1a8abSmrg _ZN10__gnu_norm15_List_node_base6unhookEv;
40263d1a8abSmrg _ZN10__gnu_norm15_List_node_base7reverseEv;
40363d1a8abSmrg _ZN10__gnu_norm15_List_node_base8transferEPS0_S1_;
40463d1a8abSmrg */
40563d1a8abSmrg #include "list.cc"
40663d1a8abSmrg _GLIBCXX_ASM_SYMVER(_ZNSt8__detail17_List_node_baseXX7_M_hookEPS0_, \
40763d1a8abSmrg _ZN10__gnu_norm15_List_node_base4hookEPS0_, \
40863d1a8abSmrg GLIBCXX_3.4)
40963d1a8abSmrg
41063d1a8abSmrg _GLIBCXX_ASM_SYMVER(_ZNSt8__detail17_List_node_baseXX4swapERS0_S1_, \
41163d1a8abSmrg _ZN10__gnu_norm15_List_node_base4swapERS0_S1_, \
41263d1a8abSmrg GLIBCXX_3.4)
41363d1a8abSmrg
41463d1a8abSmrg _GLIBCXX_ASM_SYMVER(_ZNSt8__detail17_List_node_baseXX9_M_unhookEv, \
41563d1a8abSmrg _ZN10__gnu_norm15_List_node_base6unhookEv, \
41663d1a8abSmrg GLIBCXX_3.4)
41763d1a8abSmrg
41863d1a8abSmrg _GLIBCXX_ASM_SYMVER(_ZNSt8__detail17_List_node_baseXX10_M_reverseEv, \
41963d1a8abSmrg _ZN10__gnu_norm15_List_node_base7reverseEv, \
42063d1a8abSmrg GLIBCXX_3.4)
42163d1a8abSmrg
42263d1a8abSmrg _GLIBCXX_ASM_SYMVER(_ZNSt8__detail17_List_node_baseXX11_M_transferEPS0_S1_, \
42363d1a8abSmrg _ZN10__gnu_norm15_List_node_base8transferEPS0_S1_, \
42463d1a8abSmrg GLIBCXX_3.4)
42563d1a8abSmrg #undef _List_node_base
42663d1a8abSmrg
42763d1a8abSmrg // gcc-4.1.0
42863d1a8abSmrg // Long double versions of "C" math functions.
42963d1a8abSmrg #if defined (_GLIBCXX_LONG_DOUBLE_COMPAT) \
43063d1a8abSmrg || (defined (__arm__) && defined (__linux__) && defined (__ARM_EABI__)) \
43163d1a8abSmrg || (defined (__hppa__) && defined (__linux__)) \
43263d1a8abSmrg || (defined (__m68k__) && defined (__mcoldfire__) && defined (__linux__)) \
43363d1a8abSmrg || (defined (__mips__) && defined (_ABIO32) && defined (__linux__)) \
43463d1a8abSmrg || (defined (__sh__) && defined (__linux__) && __SIZEOF_SIZE_T__ == 4) \
43563d1a8abSmrg
43663d1a8abSmrg #define _GLIBCXX_MATHL_WRAPPER(name, argdecl, args, ver) \
43763d1a8abSmrg extern "C" double \
43863d1a8abSmrg __ ## name ## l_wrapper argdecl \
43963d1a8abSmrg { \
44063d1a8abSmrg return name args; \
44163d1a8abSmrg } \
44263d1a8abSmrg asm (".symver __" #name "l_wrapper, " #name "l@" #ver)
44363d1a8abSmrg
44463d1a8abSmrg #define _GLIBCXX_MATHL_WRAPPER1(name, ver) \
44563d1a8abSmrg _GLIBCXX_MATHL_WRAPPER (name, (double x), (x), ver)
44663d1a8abSmrg
44763d1a8abSmrg #define _GLIBCXX_MATHL_WRAPPER2(name, ver) \
44863d1a8abSmrg _GLIBCXX_MATHL_WRAPPER (name, (double x, double y), (x, y), ver)
44963d1a8abSmrg
45063d1a8abSmrg #ifdef _GLIBCXX_HAVE_ACOSL
45163d1a8abSmrg _GLIBCXX_MATHL_WRAPPER1 (acos, GLIBCXX_3.4.3);
45263d1a8abSmrg #endif
45363d1a8abSmrg #ifdef _GLIBCXX_HAVE_ASINL
45463d1a8abSmrg _GLIBCXX_MATHL_WRAPPER1 (asin, GLIBCXX_3.4.3);
45563d1a8abSmrg #endif
45663d1a8abSmrg #ifdef _GLIBCXX_HAVE_ATAN2L
45763d1a8abSmrg _GLIBCXX_MATHL_WRAPPER2 (atan2, GLIBCXX_3.4);
45863d1a8abSmrg #endif
45963d1a8abSmrg #ifdef _GLIBCXX_HAVE_ATANL
46063d1a8abSmrg _GLIBCXX_MATHL_WRAPPER1 (atan, GLIBCXX_3.4.3);
46163d1a8abSmrg #endif
46263d1a8abSmrg #ifdef _GLIBCXX_HAVE_CEILL
46363d1a8abSmrg _GLIBCXX_MATHL_WRAPPER1 (ceil, GLIBCXX_3.4.3);
46463d1a8abSmrg #endif
46563d1a8abSmrg #ifdef _GLIBCXX_HAVE_COSHL
46663d1a8abSmrg _GLIBCXX_MATHL_WRAPPER1 (cosh, GLIBCXX_3.4);
46763d1a8abSmrg #endif
46863d1a8abSmrg #ifdef _GLIBCXX_HAVE_COSL
46963d1a8abSmrg _GLIBCXX_MATHL_WRAPPER1 (cos, GLIBCXX_3.4);
47063d1a8abSmrg #endif
47163d1a8abSmrg #ifdef _GLIBCXX_HAVE_EXPL
47263d1a8abSmrg _GLIBCXX_MATHL_WRAPPER1 (exp, GLIBCXX_3.4);
47363d1a8abSmrg #endif
47463d1a8abSmrg #ifdef _GLIBCXX_HAVE_FLOORL
47563d1a8abSmrg _GLIBCXX_MATHL_WRAPPER1 (floor, GLIBCXX_3.4.3);
47663d1a8abSmrg #endif
47763d1a8abSmrg #ifdef _GLIBCXX_HAVE_FMODL
47863d1a8abSmrg _GLIBCXX_MATHL_WRAPPER2 (fmod, GLIBCXX_3.4.3);
47963d1a8abSmrg #endif
48063d1a8abSmrg #ifdef _GLIBCXX_HAVE_FREXPL
48163d1a8abSmrg _GLIBCXX_MATHL_WRAPPER (frexp, (double x, int *y), (x, y), GLIBCXX_3.4.3);
48263d1a8abSmrg #endif
48363d1a8abSmrg #ifdef _GLIBCXX_HAVE_HYPOTL
48463d1a8abSmrg _GLIBCXX_MATHL_WRAPPER2 (hypot, GLIBCXX_3.4);
48563d1a8abSmrg #endif
48663d1a8abSmrg #ifdef _GLIBCXX_HAVE_LDEXPL
48763d1a8abSmrg _GLIBCXX_MATHL_WRAPPER (ldexp, (double x, int y), (x, y), GLIBCXX_3.4.3);
48863d1a8abSmrg #endif
48963d1a8abSmrg #ifdef _GLIBCXX_HAVE_LOG10L
49063d1a8abSmrg _GLIBCXX_MATHL_WRAPPER1 (log10, GLIBCXX_3.4);
49163d1a8abSmrg #endif
49263d1a8abSmrg #ifdef _GLIBCXX_HAVE_LOGL
49363d1a8abSmrg _GLIBCXX_MATHL_WRAPPER1 (log, GLIBCXX_3.4);
49463d1a8abSmrg #endif
49563d1a8abSmrg #ifdef _GLIBCXX_HAVE_MODFL
49663d1a8abSmrg _GLIBCXX_MATHL_WRAPPER (modf, (double x, double *y), (x, y), GLIBCXX_3.4.3);
49763d1a8abSmrg #endif
49863d1a8abSmrg #ifdef _GLIBCXX_HAVE_POWL
49963d1a8abSmrg _GLIBCXX_MATHL_WRAPPER2 (pow, GLIBCXX_3.4);
50063d1a8abSmrg #endif
50163d1a8abSmrg #ifdef _GLIBCXX_HAVE_SINHL
50263d1a8abSmrg _GLIBCXX_MATHL_WRAPPER1 (sinh, GLIBCXX_3.4);
50363d1a8abSmrg #endif
50463d1a8abSmrg #ifdef _GLIBCXX_HAVE_SINL
50563d1a8abSmrg _GLIBCXX_MATHL_WRAPPER1 (sin, GLIBCXX_3.4);
50663d1a8abSmrg #endif
50763d1a8abSmrg #ifdef _GLIBCXX_HAVE_SQRTL
50863d1a8abSmrg _GLIBCXX_MATHL_WRAPPER1 (sqrt, GLIBCXX_3.4);
50963d1a8abSmrg #endif
51063d1a8abSmrg #ifdef _GLIBCXX_HAVE_TANHL
51163d1a8abSmrg _GLIBCXX_MATHL_WRAPPER1 (tanh, GLIBCXX_3.4);
51263d1a8abSmrg #endif
51363d1a8abSmrg #ifdef _GLIBCXX_HAVE_TANL
51463d1a8abSmrg _GLIBCXX_MATHL_WRAPPER1 (tan, GLIBCXX_3.4);
51563d1a8abSmrg #endif
51663d1a8abSmrg #endif // _GLIBCXX_LONG_DOUBLE_COMPAT
51763d1a8abSmrg
51863d1a8abSmrg #endif
51963d1a8abSmrg
52063d1a8abSmrg #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
52163d1a8abSmrg extern void *_ZTVN10__cxxabiv123__fundamental_type_infoE[];
52263d1a8abSmrg extern void *_ZTVN10__cxxabiv119__pointer_type_infoE[];
52363d1a8abSmrg extern __attribute__((used, weak)) const char _ZTSe[2] = "e";
52463d1a8abSmrg extern __attribute__((used, weak)) const char _ZTSPe[3] = "Pe";
52563d1a8abSmrg extern __attribute__((used, weak)) const char _ZTSPKe[4] = "PKe";
52663d1a8abSmrg extern __attribute__((used, weak)) const void * const _ZTIe[2]
52763d1a8abSmrg = { reinterpret_cast<const void *>
52863d1a8abSmrg (&_ZTVN10__cxxabiv123__fundamental_type_infoE[2]),
52963d1a8abSmrg reinterpret_cast<const void *>(_ZTSe) };
53063d1a8abSmrg extern __attribute__((used, weak)) const void * const _ZTIPe[4]
53163d1a8abSmrg = { reinterpret_cast<const void *>
53263d1a8abSmrg (&_ZTVN10__cxxabiv119__pointer_type_infoE[2]),
53363d1a8abSmrg reinterpret_cast<const void *>(_ZTSPe),
53463d1a8abSmrg reinterpret_cast<const void *>(0L),
53563d1a8abSmrg reinterpret_cast<const void *>(_ZTIe) };
53663d1a8abSmrg extern __attribute__((used, weak)) const void * const _ZTIPKe[4]
53763d1a8abSmrg = { reinterpret_cast<const void *>
53863d1a8abSmrg (&_ZTVN10__cxxabiv119__pointer_type_infoE[2]),
53963d1a8abSmrg reinterpret_cast<const void *>(_ZTSPKe),
54063d1a8abSmrg reinterpret_cast<const void *>(1L),
54163d1a8abSmrg reinterpret_cast<const void *>(_ZTIe) };
54263d1a8abSmrg #endif // _GLIBCXX_LONG_DOUBLE_COMPAT
54363d1a8abSmrg
54463d1a8abSmrg #ifdef _GLIBCXX_SYMVER_DARWIN
54563d1a8abSmrg #if (defined(__ppc__) || defined(__ppc64__)) && defined(_GLIBCXX_SHARED)
54663d1a8abSmrg /* __eprintf shouldn't have been made visible from libstdc++, or
54763d1a8abSmrg anywhere, but on Mac OS X 10.4 it was defined in
54863d1a8abSmrg libstdc++.6.0.3.dylib; so on that platform we have to keep defining
54963d1a8abSmrg it to keep binary compatibility. We can't just put the libgcc
55063d1a8abSmrg version in the export list, because that doesn't work; once a
55163d1a8abSmrg symbol is marked as hidden, it stays that way. */
55263d1a8abSmrg
55363d1a8abSmrg #include <cstdio>
55463d1a8abSmrg #include <cstdlib>
55563d1a8abSmrg
55663d1a8abSmrg using namespace std;
55763d1a8abSmrg
55863d1a8abSmrg extern "C" void
__eprintf(const char * string,const char * expression,unsigned int line,const char * filename)55963d1a8abSmrg __eprintf(const char *string, const char *expression,
56063d1a8abSmrg unsigned int line, const char *filename)
56163d1a8abSmrg {
56263d1a8abSmrg fprintf(stderr, string, expression, line, filename);
56363d1a8abSmrg fflush(stderr);
56463d1a8abSmrg abort();
56563d1a8abSmrg }
56663d1a8abSmrg #endif
56763d1a8abSmrg #endif
568