]>
Commit | Line | Data |
---|---|---|
bb2b2a24 BK |
1 | // Compatibility symbols for previous versions -*- C++ -*- |
2 | ||
99dee823 | 3 | // Copyright (C) 2005-2021 Free Software Foundation, Inc. |
bb2b2a24 BK |
4 | // |
5 | // This file is part of the GNU ISO C++ Library. This library is free | |
6 | // software; you can redistribute it and/or modify it under the | |
7 | // terms of the GNU General Public License as published by the | |
748086b7 | 8 | // Free Software Foundation; either version 3, or (at your option) |
bb2b2a24 BK |
9 | // any later version. |
10 | ||
11 | // This library is distributed in the hope that it will be useful, | |
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | // GNU General Public License for more details. | |
15 | ||
748086b7 JJ |
16 | // Under Section 7 of GPL version 3, you are granted additional |
17 | // permissions described in the GCC Runtime Library Exception, version | |
18 | // 3.1, as published by the Free Software Foundation. | |
bb2b2a24 | 19 | |
748086b7 JJ |
20 | // You should have received a copy of the GNU General Public License and |
21 | // a copy of the GCC Runtime Library Exception along with this program; | |
22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | |
23 | // <http://www.gnu.org/licenses/>. | |
bb2b2a24 | 24 | |
34a2b755 | 25 | #define _GLIBCXX_USE_CXX11_ABI 0 |
bb2b2a24 BK |
26 | #include <bits/c++config.h> |
27 | ||
ac6d1200 | 28 | #if defined(_GLIBCXX_SYMVER_GNU) && defined(_GLIBCXX_SHARED) \ |
c18dc5cc RO |
29 | && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE)\ |
30 | && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT) | |
462ec415 JJ |
31 | #define istreambuf_iterator istreambuf_iteratorXX |
32 | #define basic_fstream basic_fstreamXX | |
33 | #define basic_ifstream basic_ifstreamXX | |
34 | #define basic_ofstream basic_ofstreamXX | |
35 | #define _M_copy(a, b, c) _M_copyXX(a, b, c) | |
36 | #define _M_move(a, b, c) _M_moveXX(a, b, c) | |
37 | #define _M_assign(a, b, c) _M_assignXX(a, b, c) | |
38 | #define _M_disjunct(a) _M_disjunctXX(a) | |
39 | #define _M_check_length(a, b, c) _M_check_lengthXX(a, b, c) | |
40 | #define _M_set_length_and_sharable(a) _M_set_length_and_sharableXX(a) | |
41 | #define ignore ignoreXX | |
42 | #define eq eqXX | |
3cbc7af0 | 43 | #define _List_node_base _List_node_baseXX |
bb2b2a24 BK |
44 | #endif |
45 | ||
46 | #include <string> | |
47 | #include <istream> | |
48 | #include <fstream> | |
49 | #include <sstream> | |
6defecc2 | 50 | #include <cmath> |
6725add5 | 51 | #include <ext/numeric_traits.h> |
bb2b2a24 | 52 | |
12ffa228 BK |
53 | namespace std _GLIBCXX_VISIBILITY(default) |
54 | { | |
55 | _GLIBCXX_BEGIN_NAMESPACE_VERSION | |
bb2b2a24 | 56 | |
3cbc7af0 | 57 | // std::istream ignore explicit specializations. |
bb2b2a24 BK |
58 | template<> |
59 | basic_istream<char>& | |
60 | basic_istream<char>:: | |
61 | ignore(streamsize __n) | |
62 | { | |
63 | if (__n == 1) | |
64 | return ignore(); | |
f92ab29f | 65 | |
bb2b2a24 BK |
66 | _M_gcount = 0; |
67 | sentry __cerb(*this, true); | |
880b527f | 68 | if ( __n > 0 && __cerb) |
bb2b2a24 | 69 | { |
6f0398bb | 70 | ios_base::iostate __err = ios_base::goodbit; |
bc2631e0 | 71 | __try |
bb2b2a24 BK |
72 | { |
73 | const int_type __eof = traits_type::eof(); | |
74 | __streambuf_type* __sb = this->rdbuf(); | |
75 | int_type __c = __sb->sgetc(); | |
76 | ||
77 | // See comment in istream.tcc. | |
78 | bool __large_ignore = false; | |
79 | while (true) | |
80 | { | |
81 | while (_M_gcount < __n | |
82 | && !traits_type::eq_int_type(__c, __eof)) | |
83 | { | |
84 | streamsize __size = std::min(streamsize(__sb->egptr() | |
85 | - __sb->gptr()), | |
3cbc7af0 | 86 | streamsize(__n - _M_gcount)); |
bb2b2a24 BK |
87 | if (__size > 1) |
88 | { | |
1139a735 | 89 | __sb->__safe_gbump(__size); |
bb2b2a24 BK |
90 | _M_gcount += __size; |
91 | __c = __sb->sgetc(); | |
92 | } | |
93 | else | |
94 | { | |
95 | ++_M_gcount; | |
96 | __c = __sb->snextc(); | |
f92ab29f | 97 | } |
bb2b2a24 | 98 | } |
6725add5 | 99 | if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max |
bb2b2a24 BK |
100 | && !traits_type::eq_int_type(__c, __eof)) |
101 | { | |
6725add5 PC |
102 | _M_gcount = |
103 | __gnu_cxx::__numeric_traits<streamsize>::__min; | |
bb2b2a24 BK |
104 | __large_ignore = true; |
105 | } | |
106 | else | |
107 | break; | |
108 | } | |
109 | ||
ba8fe4b4 JW |
110 | if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max) |
111 | { | |
112 | if (__large_ignore) | |
113 | _M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max; | |
bb2b2a24 | 114 | |
ba8fe4b4 JW |
115 | if (traits_type::eq_int_type(__c, __eof)) |
116 | __err |= ios_base::eofbit; | |
117 | } | |
118 | else if (_M_gcount < __n) | |
119 | { | |
120 | if (traits_type::eq_int_type(__c, __eof)) | |
121 | __err |= ios_base::eofbit; | |
122 | } | |
bb2b2a24 | 123 | } |
bc2631e0 | 124 | __catch(__cxxabiv1::__forced_unwind&) |
d05f74f1 JM |
125 | { |
126 | this->_M_setstate(ios_base::badbit); | |
127 | __throw_exception_again; | |
128 | } | |
bc2631e0 | 129 | __catch(...) |
bb2b2a24 BK |
130 | { this->_M_setstate(ios_base::badbit); } |
131 | if (__err) | |
132 | this->setstate(__err); | |
133 | } | |
134 | return *this; | |
f92ab29f | 135 | } |
bb2b2a24 BK |
136 | |
137 | #ifdef _GLIBCXX_USE_WCHAR_T | |
138 | template<> | |
139 | basic_istream<wchar_t>& | |
140 | basic_istream<wchar_t>:: | |
141 | ignore(streamsize __n) | |
142 | { | |
143 | if (__n == 1) | |
144 | return ignore(); | |
f92ab29f | 145 | |
bb2b2a24 BK |
146 | _M_gcount = 0; |
147 | sentry __cerb(*this, true); | |
880b527f | 148 | if (__n > 0 && __cerb) |
bb2b2a24 | 149 | { |
6f0398bb | 150 | ios_base::iostate __err = ios_base::goodbit; |
bc2631e0 | 151 | __try |
bb2b2a24 BK |
152 | { |
153 | const int_type __eof = traits_type::eof(); | |
154 | __streambuf_type* __sb = this->rdbuf(); | |
155 | int_type __c = __sb->sgetc(); | |
156 | ||
157 | bool __large_ignore = false; | |
158 | while (true) | |
159 | { | |
160 | while (_M_gcount < __n | |
161 | && !traits_type::eq_int_type(__c, __eof)) | |
162 | { | |
163 | streamsize __size = std::min(streamsize(__sb->egptr() | |
164 | - __sb->gptr()), | |
3cbc7af0 | 165 | streamsize(__n - _M_gcount)); |
bb2b2a24 BK |
166 | if (__size > 1) |
167 | { | |
1139a735 | 168 | __sb->__safe_gbump(__size); |
bb2b2a24 BK |
169 | _M_gcount += __size; |
170 | __c = __sb->sgetc(); | |
171 | } | |
172 | else | |
173 | { | |
174 | ++_M_gcount; | |
175 | __c = __sb->snextc(); | |
176 | } | |
177 | } | |
6725add5 | 178 | if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max |
bb2b2a24 BK |
179 | && !traits_type::eq_int_type(__c, __eof)) |
180 | { | |
6725add5 PC |
181 | _M_gcount = |
182 | __gnu_cxx::__numeric_traits<streamsize>::__min; | |
bb2b2a24 BK |
183 | __large_ignore = true; |
184 | } | |
185 | else | |
186 | break; | |
187 | } | |
188 | ||
ba8fe4b4 JW |
189 | if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max) |
190 | { | |
191 | if (__large_ignore) | |
192 | _M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max; | |
bb2b2a24 | 193 | |
ba8fe4b4 JW |
194 | if (traits_type::eq_int_type(__c, __eof)) |
195 | __err |= ios_base::eofbit; | |
196 | } | |
197 | else if (_M_gcount < __n) | |
198 | { | |
199 | if (traits_type::eq_int_type(__c, __eof)) | |
200 | __err |= ios_base::eofbit; | |
201 | } | |
bb2b2a24 | 202 | } |
bc2631e0 | 203 | __catch(__cxxabiv1::__forced_unwind&) |
d05f74f1 JM |
204 | { |
205 | this->_M_setstate(ios_base::badbit); | |
206 | __throw_exception_again; | |
207 | } | |
bc2631e0 | 208 | __catch(...) |
bb2b2a24 BK |
209 | { this->_M_setstate(ios_base::badbit); } |
210 | if (__err) | |
211 | this->setstate(__err); | |
212 | } | |
213 | return *this; | |
214 | } | |
215 | #endif | |
3cbc7af0 | 216 | |
12ffa228 | 217 | _GLIBCXX_END_NAMESPACE_VERSION |
0b284728 | 218 | } // namespace std |
3cbc7af0 | 219 | |
bb2b2a24 BK |
220 | |
221 | // NB: These symbols renames should go into the shared library only, | |
222 | // and only those shared libraries that support versioning. | |
ac6d1200 | 223 | #if defined(_GLIBCXX_SYMVER_GNU) && defined(_GLIBCXX_SHARED) \ |
c18dc5cc RO |
224 | && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \ |
225 | && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT) | |
bb2b2a24 BK |
226 | |
227 | /* gcc-3.4.4 | |
228 | _ZNSt19istreambuf_iteratorIcSt11char_traitsIcEEppEv | |
229 | _ZNSt19istreambuf_iteratorIwSt11char_traitsIwEEppEv | |
230 | */ | |
3cbc7af0 | 231 | |
12ffa228 BK |
232 | namespace std _GLIBCXX_VISIBILITY(default) |
233 | { | |
234 | _GLIBCXX_BEGIN_NAMESPACE_VERSION | |
3cbc7af0 | 235 | |
bb2b2a24 BK |
236 | template |
237 | istreambuf_iterator<char>& | |
238 | istreambuf_iterator<char>::operator++(); | |
239 | ||
240 | #ifdef _GLIBCXX_USE_WCHAR_T | |
241 | template | |
242 | istreambuf_iterator<wchar_t>& | |
243 | istreambuf_iterator<wchar_t>::operator++(); | |
244 | #endif | |
3cbc7af0 | 245 | |
12ffa228 | 246 | _GLIBCXX_END_NAMESPACE_VERSION |
0b284728 | 247 | } // namespace std |
3cbc7af0 | 248 | |
bb2b2a24 BK |
249 | |
250 | /* gcc-4.0.0 | |
251 | _ZNSs4_Rep26_M_set_length_and_sharableEj | |
252 | _ZNSs7_M_copyEPcPKcj | |
253 | _ZNSs7_M_moveEPcPKcj | |
254 | _ZNSs9_M_assignEPcjc | |
255 | _ZNKSs11_M_disjunctEPKc | |
256 | _ZNKSs15_M_check_lengthEjjPKc | |
257 | _ZNSbIwSt11char_traitsIwESaIwEE4_Rep26_M_set_length_and_sharableEj | |
258 | _ZNSbIwSt11char_traitsIwESaIwEE7_M_copyEPwPKwj | |
259 | _ZNSbIwSt11char_traitsIwESaIwEE7_M_moveEPwPKwj | |
260 | _ZNSbIwSt11char_traitsIwESaIwEE9_M_assignEPwjw | |
261 | _ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw | |
262 | _ZNKSbIwSt11char_traitsIwESaIwEE15_M_check_lengthEjjPKc | |
263 | ||
264 | _ZNKSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv | |
265 | _ZNKSt13basic_fstreamIwSt11char_traitsIwEE7is_openEv | |
266 | _ZNKSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv | |
267 | _ZNKSt14basic_ifstreamIwSt11char_traitsIwEE7is_openEv | |
268 | _ZNKSt14basic_ofstreamIcSt11char_traitsIcEE7is_openEv | |
269 | _ZNKSt14basic_ofstreamIwSt11char_traitsIwEE7is_openEv | |
270 | ||
271 | _ZNSi6ignoreEi | |
272 | _ZNSi6ignoreEv | |
273 | _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEi | |
274 | _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEv | |
275 | ||
276 | _ZNSt11char_traitsIcE2eqERKcS2_ | |
277 | _ZNSt11char_traitsIwE2eqERKwS2_ | |
278 | */ | |
12ffa228 BK |
279 | namespace std _GLIBCXX_VISIBILITY(default) |
280 | { | |
281 | _GLIBCXX_BEGIN_NAMESPACE_VERSION | |
3cbc7af0 | 282 | |
bb2b2a24 BK |
283 | // std::char_traits is explicitly specialized |
284 | bool (* __p1)(const char&, const char&) = &char_traits<char>::eq; | |
285 | ||
286 | // std::string | |
287 | template | |
288 | void | |
289 | basic_string<char>::_M_copy(char*, const char*, size_t); | |
290 | ||
291 | template | |
292 | void | |
293 | basic_string<char>::_M_move(char*, const char*, size_t); | |
294 | ||
295 | template | |
296 | void | |
297 | basic_string<char>::_M_assign(char*, size_t, char); | |
298 | ||
299 | template | |
300 | bool | |
301 | basic_string<char>::_M_disjunct(const char*) const; | |
302 | ||
303 | template | |
304 | void | |
305 | basic_string<char>::_M_check_length(size_t, size_t, const char*) const; | |
306 | ||
307 | template | |
308 | void | |
309 | basic_string<char>::_Rep::_M_set_length_and_sharable(size_t); | |
310 | ||
311 | ||
312 | // std::istream | |
313 | template | |
314 | basic_istream<char>& | |
f92ab29f | 315 | basic_istream<char>::ignore(); |
bb2b2a24 BK |
316 | |
317 | template | |
318 | bool | |
319 | basic_fstream<char>::is_open() const; | |
320 | ||
321 | template | |
322 | bool | |
323 | basic_ifstream<char>::is_open() const; | |
324 | ||
325 | template | |
326 | bool | |
327 | basic_ofstream<char>::is_open() const; | |
328 | ||
329 | #ifdef _GLIBCXX_USE_WCHAR_T | |
330 | bool (* __p2)(const wchar_t&, const wchar_t&) = &char_traits<wchar_t>::eq; | |
331 | ||
332 | // std::wstring | |
333 | template | |
334 | void | |
335 | basic_string<wchar_t>::_M_copy(wchar_t*, const wchar_t*, size_t); | |
336 | ||
337 | template | |
338 | void | |
339 | basic_string<wchar_t>::_M_move(wchar_t*, const wchar_t*, size_t); | |
340 | ||
341 | template | |
342 | void | |
343 | basic_string<wchar_t>::_M_assign(wchar_t*, size_t, wchar_t); | |
344 | ||
345 | template | |
346 | bool | |
347 | basic_string<wchar_t>::_M_disjunct(const wchar_t*) const; | |
348 | ||
349 | template | |
350 | void | |
f92ab29f | 351 | basic_string<wchar_t>::_M_check_length(size_t, size_t, |
bb2b2a24 BK |
352 | const char*) const; |
353 | ||
354 | template | |
355 | void | |
356 | basic_string<wchar_t>::_Rep::_M_set_length_and_sharable(size_t); | |
357 | ||
358 | template | |
359 | basic_istream<wchar_t>& | |
f92ab29f | 360 | basic_istream<wchar_t>::ignore(); |
bb2b2a24 BK |
361 | |
362 | template | |
363 | bool | |
364 | basic_fstream<wchar_t>::is_open() const; | |
365 | ||
366 | template | |
367 | bool | |
368 | basic_ifstream<wchar_t>::is_open() const; | |
369 | ||
370 | template | |
371 | bool | |
372 | basic_ofstream<wchar_t>::is_open() const; | |
373 | #endif | |
3cbc7af0 | 374 | |
12ffa228 | 375 | _GLIBCXX_END_NAMESPACE_VERSION |
0b284728 | 376 | } // namespace std |
bb2b2a24 BK |
377 | |
378 | // The rename syntax for default exported names is | |
379 | // asm (".symver name1,exportedname@GLIBCXX_3.4") | |
380 | // asm (".symver name2,exportedname@@GLIBCXX_3.4.5") | |
381 | // In the future, GLIBCXX_ABI > 6 should remove all uses of | |
382 | // _GLIBCXX_*_SYMVER macros in this file. | |
383 | ||
462ec415 | 384 | #define _GLIBCXX_3_4_SYMVER(XXname, name) \ |
bb2b2a24 | 385 | extern "C" void \ |
be56159c | 386 | _X##name(...) \ |
462ec415 | 387 | __attribute__ ((alias(#XXname))); \ |
bb2b2a24 BK |
388 | asm (".symver " "_X" #name "," #name "@GLIBCXX_3.4"); |
389 | ||
462ec415 | 390 | #define _GLIBCXX_3_4_5_SYMVER(XXname, name) \ |
bb2b2a24 | 391 | extern "C" void \ |
be56159c | 392 | _Y##name(...) \ |
462ec415 | 393 | __attribute__ ((alias(#XXname))); \ |
bb2b2a24 BK |
394 | asm (".symver " "_Y" #name "," #name "@@GLIBCXX_3.4.5"); |
395 | ||
396 | #define _GLIBCXX_ASM_SYMVER(cur, old, version) \ | |
397 | asm (".symver " #cur "," #old "@@" #version); | |
398 | ||
399 | #define _GLIBCXX_APPLY_SYMVER _GLIBCXX_3_4_SYMVER | |
bb2b2a24 BK |
400 | #include <bits/compatibility.h> |
401 | #undef _GLIBCXX_APPLY_SYMVER | |
bb2b2a24 BK |
402 | |
403 | #define _GLIBCXX_APPLY_SYMVER _GLIBCXX_3_4_5_SYMVER | |
bb2b2a24 BK |
404 | #include <bits/compatibility.h> |
405 | #undef _GLIBCXX_APPLY_SYMVER | |
bb2b2a24 | 406 | |
45f388bb | 407 | |
3cbc7af0 BK |
408 | /* gcc-3.4.0 |
409 | _ZN10__gnu_norm15_List_node_base4hookEPS0_; | |
410 | _ZN10__gnu_norm15_List_node_base4swapERS0_S1_; | |
411 | _ZN10__gnu_norm15_List_node_base6unhookEv; | |
412 | _ZN10__gnu_norm15_List_node_base7reverseEv; | |
413 | _ZN10__gnu_norm15_List_node_base8transferEPS0_S1_; | |
3cbc7af0 | 414 | */ |
f92ab29f | 415 | #include "list.cc" |
12ffa228 | 416 | _GLIBCXX_ASM_SYMVER(_ZNSt8__detail17_List_node_baseXX7_M_hookEPS0_, \ |
3cbc7af0 BK |
417 | _ZN10__gnu_norm15_List_node_base4hookEPS0_, \ |
418 | GLIBCXX_3.4) | |
419 | ||
12ffa228 | 420 | _GLIBCXX_ASM_SYMVER(_ZNSt8__detail17_List_node_baseXX4swapERS0_S1_, \ |
3cbc7af0 BK |
421 | _ZN10__gnu_norm15_List_node_base4swapERS0_S1_, \ |
422 | GLIBCXX_3.4) | |
423 | ||
12ffa228 | 424 | _GLIBCXX_ASM_SYMVER(_ZNSt8__detail17_List_node_baseXX9_M_unhookEv, \ |
3cbc7af0 BK |
425 | _ZN10__gnu_norm15_List_node_base6unhookEv, \ |
426 | GLIBCXX_3.4) | |
427 | ||
12ffa228 | 428 | _GLIBCXX_ASM_SYMVER(_ZNSt8__detail17_List_node_baseXX10_M_reverseEv, \ |
3cbc7af0 BK |
429 | _ZN10__gnu_norm15_List_node_base7reverseEv, \ |
430 | GLIBCXX_3.4) | |
431 | ||
12ffa228 | 432 | _GLIBCXX_ASM_SYMVER(_ZNSt8__detail17_List_node_baseXX11_M_transferEPS0_S1_, \ |
3cbc7af0 BK |
433 | _ZN10__gnu_norm15_List_node_base8transferEPS0_S1_, \ |
434 | GLIBCXX_3.4) | |
45f388bb | 435 | #undef _List_node_base |
3cbc7af0 | 436 | |
6defecc2 | 437 | // gcc-4.1.0 |
f92ab29f | 438 | // Long double versions of "C" math functions. |
adc8a1e3 | 439 | #if defined (_GLIBCXX_LONG_DOUBLE_COMPAT) \ |
a4a2087c MK |
440 | || (defined (__arm__) && defined (__linux__) && defined (__ARM_EABI__)) \ |
441 | || (defined (__hppa__) && defined (__linux__)) \ | |
442 | || (defined (__m68k__) && defined (__mcoldfire__) && defined (__linux__)) \ | |
443 | || (defined (__mips__) && defined (_ABIO32) && defined (__linux__)) \ | |
444 | || (defined (__sh__) && defined (__linux__) && __SIZEOF_SIZE_T__ == 4) \ | |
adc8a1e3 | 445 | |
6defecc2 JJ |
446 | #define _GLIBCXX_MATHL_WRAPPER(name, argdecl, args, ver) \ |
447 | extern "C" double \ | |
448 | __ ## name ## l_wrapper argdecl \ | |
449 | { \ | |
450 | return name args; \ | |
451 | } \ | |
452 | asm (".symver __" #name "l_wrapper, " #name "l@" #ver) | |
3cbc7af0 | 453 | |
6defecc2 JJ |
454 | #define _GLIBCXX_MATHL_WRAPPER1(name, ver) \ |
455 | _GLIBCXX_MATHL_WRAPPER (name, (double x), (x), ver) | |
456 | ||
457 | #define _GLIBCXX_MATHL_WRAPPER2(name, ver) \ | |
458 | _GLIBCXX_MATHL_WRAPPER (name, (double x, double y), (x, y), ver) | |
459 | ||
460 | #ifdef _GLIBCXX_HAVE_ACOSL | |
461 | _GLIBCXX_MATHL_WRAPPER1 (acos, GLIBCXX_3.4.3); | |
462 | #endif | |
463 | #ifdef _GLIBCXX_HAVE_ASINL | |
464 | _GLIBCXX_MATHL_WRAPPER1 (asin, GLIBCXX_3.4.3); | |
465 | #endif | |
466 | #ifdef _GLIBCXX_HAVE_ATAN2L | |
467 | _GLIBCXX_MATHL_WRAPPER2 (atan2, GLIBCXX_3.4); | |
468 | #endif | |
469 | #ifdef _GLIBCXX_HAVE_ATANL | |
470 | _GLIBCXX_MATHL_WRAPPER1 (atan, GLIBCXX_3.4.3); | |
471 | #endif | |
472 | #ifdef _GLIBCXX_HAVE_CEILL | |
473 | _GLIBCXX_MATHL_WRAPPER1 (ceil, GLIBCXX_3.4.3); | |
474 | #endif | |
475 | #ifdef _GLIBCXX_HAVE_COSHL | |
476 | _GLIBCXX_MATHL_WRAPPER1 (cosh, GLIBCXX_3.4); | |
477 | #endif | |
478 | #ifdef _GLIBCXX_HAVE_COSL | |
479 | _GLIBCXX_MATHL_WRAPPER1 (cos, GLIBCXX_3.4); | |
480 | #endif | |
481 | #ifdef _GLIBCXX_HAVE_EXPL | |
482 | _GLIBCXX_MATHL_WRAPPER1 (exp, GLIBCXX_3.4); | |
483 | #endif | |
484 | #ifdef _GLIBCXX_HAVE_FLOORL | |
485 | _GLIBCXX_MATHL_WRAPPER1 (floor, GLIBCXX_3.4.3); | |
486 | #endif | |
487 | #ifdef _GLIBCXX_HAVE_FMODL | |
488 | _GLIBCXX_MATHL_WRAPPER2 (fmod, GLIBCXX_3.4.3); | |
489 | #endif | |
490 | #ifdef _GLIBCXX_HAVE_FREXPL | |
491 | _GLIBCXX_MATHL_WRAPPER (frexp, (double x, int *y), (x, y), GLIBCXX_3.4.3); | |
492 | #endif | |
493 | #ifdef _GLIBCXX_HAVE_HYPOTL | |
494 | _GLIBCXX_MATHL_WRAPPER2 (hypot, GLIBCXX_3.4); | |
495 | #endif | |
496 | #ifdef _GLIBCXX_HAVE_LDEXPL | |
497 | _GLIBCXX_MATHL_WRAPPER (ldexp, (double x, int y), (x, y), GLIBCXX_3.4.3); | |
bb2b2a24 | 498 | #endif |
6defecc2 JJ |
499 | #ifdef _GLIBCXX_HAVE_LOG10L |
500 | _GLIBCXX_MATHL_WRAPPER1 (log10, GLIBCXX_3.4); | |
501 | #endif | |
502 | #ifdef _GLIBCXX_HAVE_LOGL | |
503 | _GLIBCXX_MATHL_WRAPPER1 (log, GLIBCXX_3.4); | |
504 | #endif | |
505 | #ifdef _GLIBCXX_HAVE_MODFL | |
506 | _GLIBCXX_MATHL_WRAPPER (modf, (double x, double *y), (x, y), GLIBCXX_3.4.3); | |
507 | #endif | |
508 | #ifdef _GLIBCXX_HAVE_POWL | |
509 | _GLIBCXX_MATHL_WRAPPER2 (pow, GLIBCXX_3.4); | |
510 | #endif | |
511 | #ifdef _GLIBCXX_HAVE_SINHL | |
512 | _GLIBCXX_MATHL_WRAPPER1 (sinh, GLIBCXX_3.4); | |
513 | #endif | |
514 | #ifdef _GLIBCXX_HAVE_SINL | |
515 | _GLIBCXX_MATHL_WRAPPER1 (sin, GLIBCXX_3.4); | |
516 | #endif | |
517 | #ifdef _GLIBCXX_HAVE_SQRTL | |
518 | _GLIBCXX_MATHL_WRAPPER1 (sqrt, GLIBCXX_3.4); | |
519 | #endif | |
520 | #ifdef _GLIBCXX_HAVE_TANHL | |
521 | _GLIBCXX_MATHL_WRAPPER1 (tanh, GLIBCXX_3.4); | |
522 | #endif | |
523 | #ifdef _GLIBCXX_HAVE_TANL | |
524 | _GLIBCXX_MATHL_WRAPPER1 (tan, GLIBCXX_3.4); | |
525 | #endif | |
526 | #endif // _GLIBCXX_LONG_DOUBLE_COMPAT | |
527 | ||
528 | #endif | |
529 | ||
530 | #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT | |
531 | extern void *_ZTVN10__cxxabiv123__fundamental_type_infoE[]; | |
532 | extern void *_ZTVN10__cxxabiv119__pointer_type_infoE[]; | |
533 | extern __attribute__((used, weak)) const char _ZTSe[2] = "e"; | |
534 | extern __attribute__((used, weak)) const char _ZTSPe[3] = "Pe"; | |
535 | extern __attribute__((used, weak)) const char _ZTSPKe[4] = "PKe"; | |
42016207 | 536 | extern __attribute__((used, weak)) const void * const _ZTIe[2] |
b5ff10f3 UB |
537 | = { reinterpret_cast<const void *> |
538 | (&_ZTVN10__cxxabiv123__fundamental_type_infoE[2]), | |
539 | reinterpret_cast<const void *>(_ZTSe) }; | |
42016207 | 540 | extern __attribute__((used, weak)) const void * const _ZTIPe[4] |
b5ff10f3 UB |
541 | = { reinterpret_cast<const void *> |
542 | (&_ZTVN10__cxxabiv119__pointer_type_infoE[2]), | |
543 | reinterpret_cast<const void *>(_ZTSPe), | |
544 | reinterpret_cast<const void *>(0L), | |
545 | reinterpret_cast<const void *>(_ZTIe) }; | |
42016207 | 546 | extern __attribute__((used, weak)) const void * const _ZTIPKe[4] |
b5ff10f3 UB |
547 | = { reinterpret_cast<const void *> |
548 | (&_ZTVN10__cxxabiv119__pointer_type_infoE[2]), | |
549 | reinterpret_cast<const void *>(_ZTSPKe), | |
550 | reinterpret_cast<const void *>(1L), | |
551 | reinterpret_cast<const void *>(_ZTIe) }; | |
6defecc2 JJ |
552 | #endif // _GLIBCXX_LONG_DOUBLE_COMPAT |
553 | ||
fb5c309d | 554 | #ifdef _GLIBCXX_SYMVER_DARWIN |
ac6d1200 | 555 | #if (defined(__ppc__) || defined(__ppc64__)) && defined(_GLIBCXX_SHARED) |
f9314d01 GK |
556 | /* __eprintf shouldn't have been made visible from libstdc++, or |
557 | anywhere, but on Mac OS X 10.4 it was defined in | |
558 | libstdc++.6.0.3.dylib; so on that platform we have to keep defining | |
559 | it to keep binary compatibility. We can't just put the libgcc | |
560 | version in the export list, because that doesn't work; once a | |
561 | symbol is marked as hidden, it stays that way. */ | |
562 | ||
563 | #include <cstdio> | |
564 | #include <cstdlib> | |
565 | ||
566 | using namespace std; | |
567 | ||
568 | extern "C" void | |
3cbc7af0 BK |
569 | __eprintf(const char *string, const char *expression, |
570 | unsigned int line, const char *filename) | |
f9314d01 | 571 | { |
3cbc7af0 BK |
572 | fprintf(stderr, string, expression, line, filename); |
573 | fflush(stderr); | |
574 | abort(); | |
f9314d01 GK |
575 | } |
576 | #endif | |
fb5c309d | 577 | #endif |