1 // Compatibility symbols for previous versions -*- C++ -*-
4 // Free Software Foundation, Inc.
6 // This file is part of the GNU ISO C++ Library. This library is free
7 // software; you can redistribute it and/or modify it under the
8 // terms of the GNU General Public License as published by the
9 // Free Software Foundation; either version 2, or (at your option)
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License along
18 // with this library; see the file COPYING. If not, write to the Free
19 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 // As a special exception, you may use this file as part of a free software
23 // library without restriction. Specifically, if other files instantiate
24 // templates or use macros or inline functions from this file, or you compile
25 // this file and link it with other files to produce an executable, this
26 // file does not by itself cause the resulting executable to be covered by
27 // the GNU General Public License. This exception does not however
28 // invalidate any other reasons why the executable file might be covered by
29 // the GNU General Public License.
31 #include <bits/c++config.h>
33 #if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC)
34 #define istreambuf_iterator istreambuf_iteratorXX
35 #define basic_fstream basic_fstreamXX
36 #define basic_ifstream basic_ifstreamXX
37 #define basic_ofstream basic_ofstreamXX
38 #define _M_copy(a, b, c) _M_copyXX(a, b, c)
39 #define _M_move(a, b, c) _M_moveXX(a, b, c)
40 #define _M_assign(a, b, c) _M_assignXX(a, b, c)
41 #define _M_disjunct(a) _M_disjunctXX(a)
42 #define _M_check_length(a, b, c) _M_check_lengthXX(a, b, c)
43 #define _M_set_length_and_sharable(a) _M_set_length_and_sharableXX(a)
44 #define ignore ignoreXX
46 #define _List_node_base _List_node_baseXX
47 #define __gnu_debug __gnu_debugXX
55 _GLIBCXX_BEGIN_NAMESPACE(std)
57 // std::istream ignore explicit specializations.
61 ignore(streamsize __n)
67 sentry __cerb(*this, true);
68 if (__cerb && __n > 0)
70 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
73 const int_type __eof = traits_type::eof();
74 __streambuf_type* __sb = this->rdbuf();
75 int_type __c = __sb->sgetc();
77 // See comment in istream.tcc.
78 bool __large_ignore = false;
81 while (_M_gcount < __n
82 && !traits_type::eq_int_type(__c, __eof))
84 streamsize __size = std::min(streamsize(__sb->egptr()
86 streamsize(__n - _M_gcount));
99 if (__n == numeric_limits<streamsize>::max()
100 && !traits_type::eq_int_type(__c, __eof))
102 _M_gcount = numeric_limits<streamsize>::min();
103 __large_ignore = true;
110 _M_gcount = numeric_limits<streamsize>::max();
112 if (traits_type::eq_int_type(__c, __eof))
113 __err |= ios_base::eofbit;
116 { this->_M_setstate(ios_base::badbit); }
118 this->setstate(__err);
123 #ifdef _GLIBCXX_USE_WCHAR_T
125 basic_istream<wchar_t>&
126 basic_istream<wchar_t>::
127 ignore(streamsize __n)
133 sentry __cerb(*this, true);
134 if (__cerb && __n > 0)
136 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
139 const int_type __eof = traits_type::eof();
140 __streambuf_type* __sb = this->rdbuf();
141 int_type __c = __sb->sgetc();
143 bool __large_ignore = false;
146 while (_M_gcount < __n
147 && !traits_type::eq_int_type(__c, __eof))
149 streamsize __size = std::min(streamsize(__sb->egptr()
151 streamsize(__n - _M_gcount));
161 __c = __sb->snextc();
164 if (__n == numeric_limits<streamsize>::max()
165 && !traits_type::eq_int_type(__c, __eof))
167 _M_gcount = numeric_limits<streamsize>::min();
168 __large_ignore = true;
175 _M_gcount = numeric_limits<streamsize>::max();
177 if (traits_type::eq_int_type(__c, __eof))
178 __err |= ios_base::eofbit;
181 { this->_M_setstate(ios_base::badbit); }
183 this->setstate(__err);
189 _GLIBCXX_END_NAMESPACE
192 // NB: These symbols renames should go into the shared library only,
193 // and only those shared libraries that support versioning.
194 #if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC)
197 _ZNSt19istreambuf_iteratorIcSt11char_traitsIcEEppEv
198 _ZNSt19istreambuf_iteratorIwSt11char_traitsIwEEppEv
201 _GLIBCXX_BEGIN_NAMESPACE(std)
204 istreambuf_iterator<char>&
205 istreambuf_iterator<char>::operator++();
207 #ifdef _GLIBCXX_USE_WCHAR_T
209 istreambuf_iterator<wchar_t>&
210 istreambuf_iterator<wchar_t>::operator++();
213 _GLIBCXX_END_NAMESPACE
217 _ZNSs4_Rep26_M_set_length_and_sharableEj
221 _ZNKSs11_M_disjunctEPKc
222 _ZNKSs15_M_check_lengthEjjPKc
223 _ZNSbIwSt11char_traitsIwESaIwEE4_Rep26_M_set_length_and_sharableEj
224 _ZNSbIwSt11char_traitsIwESaIwEE7_M_copyEPwPKwj
225 _ZNSbIwSt11char_traitsIwESaIwEE7_M_moveEPwPKwj
226 _ZNSbIwSt11char_traitsIwESaIwEE9_M_assignEPwjw
227 _ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw
228 _ZNKSbIwSt11char_traitsIwESaIwEE15_M_check_lengthEjjPKc
230 _ZNKSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv
231 _ZNKSt13basic_fstreamIwSt11char_traitsIwEE7is_openEv
232 _ZNKSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv
233 _ZNKSt14basic_ifstreamIwSt11char_traitsIwEE7is_openEv
234 _ZNKSt14basic_ofstreamIcSt11char_traitsIcEE7is_openEv
235 _ZNKSt14basic_ofstreamIwSt11char_traitsIwEE7is_openEv
239 _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEi
240 _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEv
242 _ZNSt11char_traitsIcE2eqERKcS2_
243 _ZNSt11char_traitsIwE2eqERKwS2_
245 _GLIBCXX_BEGIN_NAMESPACE(std)
247 // std::char_traits is explicitly specialized
248 bool (* __p1)(const char&, const char&) = &char_traits<char>::eq;
253 basic_string<char>::_M_copy(char*, const char*, size_t);
257 basic_string<char>::_M_move(char*, const char*, size_t);
261 basic_string<char>::_M_assign(char*, size_t, char);
265 basic_string<char>::_M_disjunct(const char*) const;
269 basic_string<char>::_M_check_length(size_t, size_t, const char*) const;
273 basic_string<char>::_Rep::_M_set_length_and_sharable(size_t);
279 basic_istream<char>::ignore();
283 basic_fstream<char>::is_open() const;
287 basic_ifstream<char>::is_open() const;
291 basic_ofstream<char>::is_open() const;
293 #ifdef _GLIBCXX_USE_WCHAR_T
294 bool (* __p2)(const wchar_t&, const wchar_t&) = &char_traits<wchar_t>::eq;
299 basic_string<wchar_t>::_M_copy(wchar_t*, const wchar_t*, size_t);
303 basic_string<wchar_t>::_M_move(wchar_t*, const wchar_t*, size_t);
307 basic_string<wchar_t>::_M_assign(wchar_t*, size_t, wchar_t);
311 basic_string<wchar_t>::_M_disjunct(const wchar_t*) const;
315 basic_string<wchar_t>::_M_check_length(size_t, size_t,
320 basic_string<wchar_t>::_Rep::_M_set_length_and_sharable(size_t);
323 basic_istream<wchar_t>&
324 basic_istream<wchar_t>::ignore();
328 basic_fstream<wchar_t>::is_open() const;
332 basic_ifstream<wchar_t>::is_open() const;
336 basic_ofstream<wchar_t>::is_open() const;
339 _GLIBCXX_END_NAMESPACE
341 // The rename syntax for default exported names is
342 // asm (".symver name1,exportedname@GLIBCXX_3.4")
343 // asm (".symver name2,exportedname@@GLIBCXX_3.4.5")
344 // In the future, GLIBCXX_ABI > 6 should remove all uses of
345 // _GLIBCXX_*_SYMVER macros in this file.
347 #define _GLIBCXX_3_4_SYMVER(XXname, name) \
350 __attribute__ ((alias(#XXname))); \
351 asm (".symver " "_X" #name "," #name "@GLIBCXX_3.4");
353 #define _GLIBCXX_3_4_5_SYMVER(XXname, name) \
356 __attribute__ ((alias(#XXname))); \
357 asm (".symver " "_Y" #name "," #name "@@GLIBCXX_3.4.5");
359 #define _GLIBCXX_ASM_SYMVER(cur, old, version) \
360 asm (".symver " #cur "," #old "@@" #version);
362 #define _GLIBCXX_APPLY_SYMVER _GLIBCXX_3_4_SYMVER
363 #include <bits/compatibility.h>
364 #undef _GLIBCXX_APPLY_SYMVER
366 #define _GLIBCXX_APPLY_SYMVER _GLIBCXX_3_4_5_SYMVER
367 #include <bits/compatibility.h>
368 #undef _GLIBCXX_APPLY_SYMVER
371 _ZN10__gnu_norm15_List_node_base4hookEPS0_;
372 _ZN10__gnu_norm15_List_node_base4swapERS0_S1_;
373 _ZN10__gnu_norm15_List_node_base6unhookEv;
374 _ZN10__gnu_norm15_List_node_base7reverseEv;
375 _ZN10__gnu_norm15_List_node_base8transferEPS0_S1_;
376 _ZN11__gnu_debug19_Safe_iterator_base9_M_attachEPNS_19_Safe_sequence_baseEb;
377 _ZN11__gnu_debug19_Safe_iterator_base9_M_detachEv;
378 _ZNK11__gnu_debug19_Safe_iterator_base11_M_singularEv;
379 _ZNK11__gnu_debug19_Safe_iterator_base14_M_can_compareERKS0_;
380 _ZN11__gnu_debug19_Safe_sequence_base13_M_detach_allEv;
381 _ZN11__gnu_debug19_Safe_sequence_base18_M_detach_singularEv;
382 _ZN11__gnu_debug19_Safe_sequence_base22_M_revalidate_singularEv;
383 _ZN11__gnu_debug19_Safe_sequence_base7_M_swapERS0_;
384 _ZNK11__gnu_debug16_Error_formatter8_M_errorEv;
385 _ZNK11__gnu_debug16_Error_formatter10_M_messageENS_13_Debug_msg_idE;
386 _ZNK11__gnu_debug16_Error_formatter10_Parameter14_M_print_fieldEPKS0_PKc;
387 _ZNK11__gnu_debug16_Error_formatter10_Parameter20_M_print_descriptionEPKS0_;
388 _ZNK11__gnu_debug16_Error_formatter13_M_print_wordEPKc;
389 _ZNK11__gnu_debug16_Error_formatter15_M_print_stringEPKc;
391 #include "debug_list.cc"
394 _GLIBCXX_ASM_SYMVER(_ZNSt17_List_node_baseXX4hookEPS_, \
395 _ZN10__gnu_norm15_List_node_base4hookEPS0_, \
398 _GLIBCXX_ASM_SYMVER(_ZNSt17_List_node_baseXX4swapERS_S0_, \
399 _ZN10__gnu_norm15_List_node_base4swapERS0_S1_, \
402 _GLIBCXX_ASM_SYMVER(_ZNSt17_List_node_baseXX6unhookEv, \
403 _ZN10__gnu_norm15_List_node_base6unhookEv, \
406 _GLIBCXX_ASM_SYMVER(_ZNSt17_List_node_baseXX7reverseEv, \
407 _ZN10__gnu_norm15_List_node_base7reverseEv, \
410 _GLIBCXX_ASM_SYMVER(_ZNSt17_List_node_baseXX8transferEPS_S0_, \
411 _ZN10__gnu_norm15_List_node_base8transferEPS0_S1_, \
414 _GLIBCXX_ASM_SYMVER(_ZNSt13__gnu_debugXX19_Safe_iterator_base9_M_attachEPNS_19_Safe_sequence_baseEb, \
415 _ZN11__gnu_debug19_Safe_iterator_base9_M_attachEPNS_19_Safe_sequence_baseEb, \
418 _GLIBCXX_ASM_SYMVER(_ZNSt13__gnu_debugXX19_Safe_iterator_base9_M_detachEv, \
419 _ZN11__gnu_debug19_Safe_iterator_base9_M_detachEv, \
422 _GLIBCXX_ASM_SYMVER(_ZNKSt13__gnu_debugXX19_Safe_iterator_base11_M_singularEv,\
423 _ZNK11__gnu_debug19_Safe_iterator_base11_M_singularEv, \
426 _GLIBCXX_ASM_SYMVER(_ZNKSt13__gnu_debugXX19_Safe_iterator_base14_M_can_compareERKS0_, \
427 _ZNK11__gnu_debug19_Safe_iterator_base14_M_can_compareERKS0_, \
430 _GLIBCXX_ASM_SYMVER(_ZNSt13__gnu_debugXX19_Safe_sequence_base13_M_detach_allEv, \
431 _ZN11__gnu_debug19_Safe_sequence_base13_M_detach_allEv, \
434 _GLIBCXX_ASM_SYMVER(_ZNSt13__gnu_debugXX19_Safe_sequence_base18_M_detach_singularEv, \
435 _ZN11__gnu_debug19_Safe_sequence_base18_M_detach_singularEv, \
438 _GLIBCXX_ASM_SYMVER(_ZNSt13__gnu_debugXX19_Safe_sequence_base22_M_revalidate_singularEv, \
439 _ZN11__gnu_debug19_Safe_sequence_base22_M_revalidate_singularEv, \
442 _GLIBCXX_ASM_SYMVER(_ZNSt13__gnu_debugXX19_Safe_sequence_base7_M_swapERS0_, \
443 _ZN11__gnu_debug19_Safe_sequence_base7_M_swapERS0_, \
446 _GLIBCXX_ASM_SYMVER(_ZNKSt13__gnu_debugXX16_Error_formatter8_M_errorEv, \
447 _ZNK11__gnu_debug16_Error_formatter8_M_errorEv, \
450 _GLIBCXX_ASM_SYMVER(_ZNKSt13__gnu_debugXX16_Error_formatter10_M_messageENS_13_Debug_msg_idE, \
451 _ZNK11__gnu_debug16_Error_formatter10_M_messageENS_13_Debug_msg_idE, \
454 _GLIBCXX_ASM_SYMVER(_ZNKSt13__gnu_debugXX16_Error_formatter10_Parameter14_M_print_fieldEPKS0_PKc, \
455 _ZNK11__gnu_debug16_Error_formatter10_Parameter14_M_print_fieldEPKS0_PKc, \
458 _GLIBCXX_ASM_SYMVER(_ZNKSt13__gnu_debugXX16_Error_formatter10_Parameter20_M_print_descriptionEPKS0_, \
459 _ZNK11__gnu_debug16_Error_formatter10_Parameter20_M_print_descriptionEPKS0_, \
462 _GLIBCXX_ASM_SYMVER(_ZNKSt13__gnu_debugXX16_Error_formatter13_M_print_wordEPKc, \
463 _ZNK11__gnu_debug16_Error_formatter13_M_print_wordEPKc, \
466 _GLIBCXX_ASM_SYMVER(_ZNKSt13__gnu_debugXX16_Error_formatter15_M_print_stringEPKc, \
467 _ZNK11__gnu_debug16_Error_formatter15_M_print_stringEPKc, \
473 #ifdef _GLIBCXX_SYMVER_DARWIN
474 #if (defined(__ppc__) || defined (__ppc64__)) && defined (PIC)
475 /* __eprintf shouldn't have been made visible from libstdc++, or
476 anywhere, but on Mac OS X 10.4 it was defined in
477 libstdc++.6.0.3.dylib; so on that platform we have to keep defining
478 it to keep binary compatibility. We can't just put the libgcc
479 version in the export list, because that doesn't work; once a
480 symbol is marked as hidden, it stays that way. */
488 __eprintf(const char *string, const char *expression,
489 unsigned int line, const char *filename)
491 fprintf(stderr, string, expression, line, filename);