]>
Commit | Line | Data |
---|---|---|
bb2b2a24 BK |
1 | // Compatibility symbols for previous versions -*- C++ -*- |
2 | ||
aa118a03 | 3 | // Copyright (C) 2005-2014 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(); | |
65 | ||
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(); | |
97 | } | |
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 | ||
110 | if (__large_ignore) | |
6725add5 | 111 | _M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max; |
bb2b2a24 BK |
112 | |
113 | if (traits_type::eq_int_type(__c, __eof)) | |
114 | __err |= ios_base::eofbit; | |
115 | } | |
bc2631e0 | 116 | __catch(__cxxabiv1::__forced_unwind&) |
d05f74f1 JM |
117 | { |
118 | this->_M_setstate(ios_base::badbit); | |
119 | __throw_exception_again; | |
120 | } | |
bc2631e0 | 121 | __catch(...) |
bb2b2a24 BK |
122 | { this->_M_setstate(ios_base::badbit); } |
123 | if (__err) | |
124 | this->setstate(__err); | |
125 | } | |
126 | return *this; | |
127 | } | |
128 | ||
129 | #ifdef _GLIBCXX_USE_WCHAR_T | |
130 | template<> | |
131 | basic_istream<wchar_t>& | |
132 | basic_istream<wchar_t>:: | |
133 | ignore(streamsize __n) | |
134 | { | |
135 | if (__n == 1) | |
136 | return ignore(); | |
137 | ||
138 | _M_gcount = 0; | |
139 | sentry __cerb(*this, true); | |
880b527f | 140 | if (__n > 0 && __cerb) |
bb2b2a24 | 141 | { |
6f0398bb | 142 | ios_base::iostate __err = ios_base::goodbit; |
bc2631e0 | 143 | __try |
bb2b2a24 BK |
144 | { |
145 | const int_type __eof = traits_type::eof(); | |
146 | __streambuf_type* __sb = this->rdbuf(); | |
147 | int_type __c = __sb->sgetc(); | |
148 | ||
149 | bool __large_ignore = false; | |
150 | while (true) | |
151 | { | |
152 | while (_M_gcount < __n | |
153 | && !traits_type::eq_int_type(__c, __eof)) | |
154 | { | |
155 | streamsize __size = std::min(streamsize(__sb->egptr() | |
156 | - __sb->gptr()), | |
3cbc7af0 | 157 | streamsize(__n - _M_gcount)); |
bb2b2a24 BK |
158 | if (__size > 1) |
159 | { | |
1139a735 | 160 | __sb->__safe_gbump(__size); |
bb2b2a24 BK |
161 | _M_gcount += __size; |
162 | __c = __sb->sgetc(); | |
163 | } | |
164 | else | |
165 | { | |
166 | ++_M_gcount; | |
167 | __c = __sb->snextc(); | |
168 | } | |
169 | } | |
6725add5 | 170 | if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max |
bb2b2a24 BK |
171 | && !traits_type::eq_int_type(__c, __eof)) |
172 | { | |
6725add5 PC |
173 | _M_gcount = |
174 | __gnu_cxx::__numeric_traits<streamsize>::__min; | |
bb2b2a24 BK |
175 | __large_ignore = true; |
176 | } | |
177 | else | |
178 | break; | |
179 | } | |
180 | ||
181 | if (__large_ignore) | |
6725add5 | 182 | _M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max; |
bb2b2a24 BK |
183 | |
184 | if (traits_type::eq_int_type(__c, __eof)) | |
185 | __err |= ios_base::eofbit; | |
186 | } | |
bc2631e0 | 187 | __catch(__cxxabiv1::__forced_unwind&) |
d05f74f1 JM |
188 | { |
189 | this->_M_setstate(ios_base::badbit); | |
190 | __throw_exception_again; | |
191 | } | |
bc2631e0 | 192 | __catch(...) |
bb2b2a24 BK |
193 | { this->_M_setstate(ios_base::badbit); } |
194 | if (__err) | |
195 | this->setstate(__err); | |
196 | } | |
197 | return *this; | |
198 | } | |
199 | #endif | |
3cbc7af0 | 200 | |
12ffa228 | 201 | _GLIBCXX_END_NAMESPACE_VERSION |
0b284728 | 202 | } // namespace std |
3cbc7af0 | 203 | |
bb2b2a24 BK |
204 | |
205 | // NB: These symbols renames should go into the shared library only, | |
206 | // and only those shared libraries that support versioning. | |
ac6d1200 | 207 | #if defined(_GLIBCXX_SYMVER_GNU) && defined(_GLIBCXX_SHARED) \ |
c18dc5cc RO |
208 | && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \ |
209 | && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT) | |
bb2b2a24 BK |
210 | |
211 | /* gcc-3.4.4 | |
212 | _ZNSt19istreambuf_iteratorIcSt11char_traitsIcEEppEv | |
213 | _ZNSt19istreambuf_iteratorIwSt11char_traitsIwEEppEv | |
214 | */ | |
3cbc7af0 | 215 | |
12ffa228 BK |
216 | namespace std _GLIBCXX_VISIBILITY(default) |
217 | { | |
218 | _GLIBCXX_BEGIN_NAMESPACE_VERSION | |
3cbc7af0 | 219 | |
bb2b2a24 BK |
220 | template |
221 | istreambuf_iterator<char>& | |
222 | istreambuf_iterator<char>::operator++(); | |
223 | ||
224 | #ifdef _GLIBCXX_USE_WCHAR_T | |
225 | template | |
226 | istreambuf_iterator<wchar_t>& | |
227 | istreambuf_iterator<wchar_t>::operator++(); | |
228 | #endif | |
3cbc7af0 | 229 | |
12ffa228 | 230 | _GLIBCXX_END_NAMESPACE_VERSION |
0b284728 | 231 | } // namespace std |
3cbc7af0 | 232 | |
bb2b2a24 BK |
233 | |
234 | /* gcc-4.0.0 | |
235 | _ZNSs4_Rep26_M_set_length_and_sharableEj | |
236 | _ZNSs7_M_copyEPcPKcj | |
237 | _ZNSs7_M_moveEPcPKcj | |
238 | _ZNSs9_M_assignEPcjc | |
239 | _ZNKSs11_M_disjunctEPKc | |
240 | _ZNKSs15_M_check_lengthEjjPKc | |
241 | _ZNSbIwSt11char_traitsIwESaIwEE4_Rep26_M_set_length_and_sharableEj | |
242 | _ZNSbIwSt11char_traitsIwESaIwEE7_M_copyEPwPKwj | |
243 | _ZNSbIwSt11char_traitsIwESaIwEE7_M_moveEPwPKwj | |
244 | _ZNSbIwSt11char_traitsIwESaIwEE9_M_assignEPwjw | |
245 | _ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw | |
246 | _ZNKSbIwSt11char_traitsIwESaIwEE15_M_check_lengthEjjPKc | |
247 | ||
248 | _ZNKSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv | |
249 | _ZNKSt13basic_fstreamIwSt11char_traitsIwEE7is_openEv | |
250 | _ZNKSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv | |
251 | _ZNKSt14basic_ifstreamIwSt11char_traitsIwEE7is_openEv | |
252 | _ZNKSt14basic_ofstreamIcSt11char_traitsIcEE7is_openEv | |
253 | _ZNKSt14basic_ofstreamIwSt11char_traitsIwEE7is_openEv | |
254 | ||
255 | _ZNSi6ignoreEi | |
256 | _ZNSi6ignoreEv | |
257 | _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEi | |
258 | _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEv | |
259 | ||
260 | _ZNSt11char_traitsIcE2eqERKcS2_ | |
261 | _ZNSt11char_traitsIwE2eqERKwS2_ | |
262 | */ | |
12ffa228 BK |
263 | namespace std _GLIBCXX_VISIBILITY(default) |
264 | { | |
265 | _GLIBCXX_BEGIN_NAMESPACE_VERSION | |
3cbc7af0 | 266 | |
bb2b2a24 BK |
267 | // std::char_traits is explicitly specialized |
268 | bool (* __p1)(const char&, const char&) = &char_traits<char>::eq; | |
269 | ||
270 | // std::string | |
271 | template | |
272 | void | |
273 | basic_string<char>::_M_copy(char*, const char*, size_t); | |
274 | ||
275 | template | |
276 | void | |
277 | basic_string<char>::_M_move(char*, const char*, size_t); | |
278 | ||
279 | template | |
280 | void | |
281 | basic_string<char>::_M_assign(char*, size_t, char); | |
282 | ||
283 | template | |
284 | bool | |
285 | basic_string<char>::_M_disjunct(const char*) const; | |
286 | ||
287 | template | |
288 | void | |
289 | basic_string<char>::_M_check_length(size_t, size_t, const char*) const; | |
290 | ||
291 | template | |
292 | void | |
293 | basic_string<char>::_Rep::_M_set_length_and_sharable(size_t); | |
294 | ||
295 | ||
296 | // std::istream | |
297 | template | |
298 | basic_istream<char>& | |
299 | basic_istream<char>::ignore(); | |
300 | ||
301 | template | |
302 | bool | |
303 | basic_fstream<char>::is_open() const; | |
304 | ||
305 | template | |
306 | bool | |
307 | basic_ifstream<char>::is_open() const; | |
308 | ||
309 | template | |
310 | bool | |
311 | basic_ofstream<char>::is_open() const; | |
312 | ||
313 | #ifdef _GLIBCXX_USE_WCHAR_T | |
314 | bool (* __p2)(const wchar_t&, const wchar_t&) = &char_traits<wchar_t>::eq; | |
315 | ||
316 | // std::wstring | |
317 | template | |
318 | void | |
319 | basic_string<wchar_t>::_M_copy(wchar_t*, const wchar_t*, size_t); | |
320 | ||
321 | template | |
322 | void | |
323 | basic_string<wchar_t>::_M_move(wchar_t*, const wchar_t*, size_t); | |
324 | ||
325 | template | |
326 | void | |
327 | basic_string<wchar_t>::_M_assign(wchar_t*, size_t, wchar_t); | |
328 | ||
329 | template | |
330 | bool | |
331 | basic_string<wchar_t>::_M_disjunct(const wchar_t*) const; | |
332 | ||
333 | template | |
334 | void | |
335 | basic_string<wchar_t>::_M_check_length(size_t, size_t, | |
336 | const char*) const; | |
337 | ||
338 | template | |
339 | void | |
340 | basic_string<wchar_t>::_Rep::_M_set_length_and_sharable(size_t); | |
341 | ||
342 | template | |
343 | basic_istream<wchar_t>& | |
344 | basic_istream<wchar_t>::ignore(); | |
345 | ||
346 | template | |
347 | bool | |
348 | basic_fstream<wchar_t>::is_open() const; | |
349 | ||
350 | template | |
351 | bool | |
352 | basic_ifstream<wchar_t>::is_open() const; | |
353 | ||
354 | template | |
355 | bool | |
356 | basic_ofstream<wchar_t>::is_open() const; | |
357 | #endif | |
3cbc7af0 | 358 | |
12ffa228 | 359 | _GLIBCXX_END_NAMESPACE_VERSION |
0b284728 | 360 | } // namespace std |
bb2b2a24 BK |
361 | |
362 | // The rename syntax for default exported names is | |
363 | // asm (".symver name1,exportedname@GLIBCXX_3.4") | |
364 | // asm (".symver name2,exportedname@@GLIBCXX_3.4.5") | |
365 | // In the future, GLIBCXX_ABI > 6 should remove all uses of | |
366 | // _GLIBCXX_*_SYMVER macros in this file. | |
367 | ||
462ec415 | 368 | #define _GLIBCXX_3_4_SYMVER(XXname, name) \ |
bb2b2a24 BK |
369 | extern "C" void \ |
370 | _X##name() \ | |
462ec415 | 371 | __attribute__ ((alias(#XXname))); \ |
bb2b2a24 BK |
372 | asm (".symver " "_X" #name "," #name "@GLIBCXX_3.4"); |
373 | ||
462ec415 | 374 | #define _GLIBCXX_3_4_5_SYMVER(XXname, name) \ |
bb2b2a24 BK |
375 | extern "C" void \ |
376 | _Y##name() \ | |
462ec415 | 377 | __attribute__ ((alias(#XXname))); \ |
bb2b2a24 BK |
378 | asm (".symver " "_Y" #name "," #name "@@GLIBCXX_3.4.5"); |
379 | ||
380 | #define _GLIBCXX_ASM_SYMVER(cur, old, version) \ | |
381 | asm (".symver " #cur "," #old "@@" #version); | |
382 | ||
383 | #define _GLIBCXX_APPLY_SYMVER _GLIBCXX_3_4_SYMVER | |
bb2b2a24 BK |
384 | #include <bits/compatibility.h> |
385 | #undef _GLIBCXX_APPLY_SYMVER | |
bb2b2a24 BK |
386 | |
387 | #define _GLIBCXX_APPLY_SYMVER _GLIBCXX_3_4_5_SYMVER | |
bb2b2a24 BK |
388 | #include <bits/compatibility.h> |
389 | #undef _GLIBCXX_APPLY_SYMVER | |
bb2b2a24 | 390 | |
45f388bb | 391 | |
3cbc7af0 BK |
392 | /* gcc-3.4.0 |
393 | _ZN10__gnu_norm15_List_node_base4hookEPS0_; | |
394 | _ZN10__gnu_norm15_List_node_base4swapERS0_S1_; | |
395 | _ZN10__gnu_norm15_List_node_base6unhookEv; | |
396 | _ZN10__gnu_norm15_List_node_base7reverseEv; | |
397 | _ZN10__gnu_norm15_List_node_base8transferEPS0_S1_; | |
3cbc7af0 | 398 | */ |
12ffa228 BK |
399 | #include "list.cc" |
400 | _GLIBCXX_ASM_SYMVER(_ZNSt8__detail17_List_node_baseXX7_M_hookEPS0_, \ | |
3cbc7af0 BK |
401 | _ZN10__gnu_norm15_List_node_base4hookEPS0_, \ |
402 | GLIBCXX_3.4) | |
403 | ||
12ffa228 | 404 | _GLIBCXX_ASM_SYMVER(_ZNSt8__detail17_List_node_baseXX4swapERS0_S1_, \ |
3cbc7af0 BK |
405 | _ZN10__gnu_norm15_List_node_base4swapERS0_S1_, \ |
406 | GLIBCXX_3.4) | |
407 | ||
12ffa228 | 408 | _GLIBCXX_ASM_SYMVER(_ZNSt8__detail17_List_node_baseXX9_M_unhookEv, \ |
3cbc7af0 BK |
409 | _ZN10__gnu_norm15_List_node_base6unhookEv, \ |
410 | GLIBCXX_3.4) | |
411 | ||
12ffa228 | 412 | _GLIBCXX_ASM_SYMVER(_ZNSt8__detail17_List_node_baseXX10_M_reverseEv, \ |
3cbc7af0 BK |
413 | _ZN10__gnu_norm15_List_node_base7reverseEv, \ |
414 | GLIBCXX_3.4) | |
415 | ||
12ffa228 | 416 | _GLIBCXX_ASM_SYMVER(_ZNSt8__detail17_List_node_baseXX11_M_transferEPS0_S1_, \ |
3cbc7af0 BK |
417 | _ZN10__gnu_norm15_List_node_base8transferEPS0_S1_, \ |
418 | GLIBCXX_3.4) | |
45f388bb | 419 | #undef _List_node_base |
3cbc7af0 | 420 | |
6defecc2 | 421 | // gcc-4.1.0 |
adc8a1e3 BK |
422 | // Long double versions of "C" math functions. |
423 | #if defined (_GLIBCXX_LONG_DOUBLE_COMPAT) \ | |
a4a2087c MK |
424 | || (defined (__arm__) && defined (__linux__) && defined (__ARM_EABI__)) \ |
425 | || (defined (__hppa__) && defined (__linux__)) \ | |
426 | || (defined (__m68k__) && defined (__mcoldfire__) && defined (__linux__)) \ | |
427 | || (defined (__mips__) && defined (_ABIO32) && defined (__linux__)) \ | |
428 | || (defined (__sh__) && defined (__linux__) && __SIZEOF_SIZE_T__ == 4) \ | |
adc8a1e3 | 429 | |
6defecc2 JJ |
430 | #define _GLIBCXX_MATHL_WRAPPER(name, argdecl, args, ver) \ |
431 | extern "C" double \ | |
432 | __ ## name ## l_wrapper argdecl \ | |
433 | { \ | |
434 | return name args; \ | |
435 | } \ | |
436 | asm (".symver __" #name "l_wrapper, " #name "l@" #ver) | |
3cbc7af0 | 437 | |
6defecc2 JJ |
438 | #define _GLIBCXX_MATHL_WRAPPER1(name, ver) \ |
439 | _GLIBCXX_MATHL_WRAPPER (name, (double x), (x), ver) | |
440 | ||
441 | #define _GLIBCXX_MATHL_WRAPPER2(name, ver) \ | |
442 | _GLIBCXX_MATHL_WRAPPER (name, (double x, double y), (x, y), ver) | |
443 | ||
444 | #ifdef _GLIBCXX_HAVE_ACOSL | |
445 | _GLIBCXX_MATHL_WRAPPER1 (acos, GLIBCXX_3.4.3); | |
446 | #endif | |
447 | #ifdef _GLIBCXX_HAVE_ASINL | |
448 | _GLIBCXX_MATHL_WRAPPER1 (asin, GLIBCXX_3.4.3); | |
449 | #endif | |
450 | #ifdef _GLIBCXX_HAVE_ATAN2L | |
451 | _GLIBCXX_MATHL_WRAPPER2 (atan2, GLIBCXX_3.4); | |
452 | #endif | |
453 | #ifdef _GLIBCXX_HAVE_ATANL | |
454 | _GLIBCXX_MATHL_WRAPPER1 (atan, GLIBCXX_3.4.3); | |
455 | #endif | |
456 | #ifdef _GLIBCXX_HAVE_CEILL | |
457 | _GLIBCXX_MATHL_WRAPPER1 (ceil, GLIBCXX_3.4.3); | |
458 | #endif | |
459 | #ifdef _GLIBCXX_HAVE_COSHL | |
460 | _GLIBCXX_MATHL_WRAPPER1 (cosh, GLIBCXX_3.4); | |
461 | #endif | |
462 | #ifdef _GLIBCXX_HAVE_COSL | |
463 | _GLIBCXX_MATHL_WRAPPER1 (cos, GLIBCXX_3.4); | |
464 | #endif | |
465 | #ifdef _GLIBCXX_HAVE_EXPL | |
466 | _GLIBCXX_MATHL_WRAPPER1 (exp, GLIBCXX_3.4); | |
467 | #endif | |
468 | #ifdef _GLIBCXX_HAVE_FLOORL | |
469 | _GLIBCXX_MATHL_WRAPPER1 (floor, GLIBCXX_3.4.3); | |
470 | #endif | |
471 | #ifdef _GLIBCXX_HAVE_FMODL | |
472 | _GLIBCXX_MATHL_WRAPPER2 (fmod, GLIBCXX_3.4.3); | |
473 | #endif | |
474 | #ifdef _GLIBCXX_HAVE_FREXPL | |
475 | _GLIBCXX_MATHL_WRAPPER (frexp, (double x, int *y), (x, y), GLIBCXX_3.4.3); | |
476 | #endif | |
477 | #ifdef _GLIBCXX_HAVE_HYPOTL | |
478 | _GLIBCXX_MATHL_WRAPPER2 (hypot, GLIBCXX_3.4); | |
479 | #endif | |
480 | #ifdef _GLIBCXX_HAVE_LDEXPL | |
481 | _GLIBCXX_MATHL_WRAPPER (ldexp, (double x, int y), (x, y), GLIBCXX_3.4.3); | |
bb2b2a24 | 482 | #endif |
6defecc2 JJ |
483 | #ifdef _GLIBCXX_HAVE_LOG10L |
484 | _GLIBCXX_MATHL_WRAPPER1 (log10, GLIBCXX_3.4); | |
485 | #endif | |
486 | #ifdef _GLIBCXX_HAVE_LOGL | |
487 | _GLIBCXX_MATHL_WRAPPER1 (log, GLIBCXX_3.4); | |
488 | #endif | |
489 | #ifdef _GLIBCXX_HAVE_MODFL | |
490 | _GLIBCXX_MATHL_WRAPPER (modf, (double x, double *y), (x, y), GLIBCXX_3.4.3); | |
491 | #endif | |
492 | #ifdef _GLIBCXX_HAVE_POWL | |
493 | _GLIBCXX_MATHL_WRAPPER2 (pow, GLIBCXX_3.4); | |
494 | #endif | |
495 | #ifdef _GLIBCXX_HAVE_SINHL | |
496 | _GLIBCXX_MATHL_WRAPPER1 (sinh, GLIBCXX_3.4); | |
497 | #endif | |
498 | #ifdef _GLIBCXX_HAVE_SINL | |
499 | _GLIBCXX_MATHL_WRAPPER1 (sin, GLIBCXX_3.4); | |
500 | #endif | |
501 | #ifdef _GLIBCXX_HAVE_SQRTL | |
502 | _GLIBCXX_MATHL_WRAPPER1 (sqrt, GLIBCXX_3.4); | |
503 | #endif | |
504 | #ifdef _GLIBCXX_HAVE_TANHL | |
505 | _GLIBCXX_MATHL_WRAPPER1 (tanh, GLIBCXX_3.4); | |
506 | #endif | |
507 | #ifdef _GLIBCXX_HAVE_TANL | |
508 | _GLIBCXX_MATHL_WRAPPER1 (tan, GLIBCXX_3.4); | |
509 | #endif | |
510 | #endif // _GLIBCXX_LONG_DOUBLE_COMPAT | |
511 | ||
512 | #endif | |
513 | ||
514 | #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT | |
515 | extern void *_ZTVN10__cxxabiv123__fundamental_type_infoE[]; | |
516 | extern void *_ZTVN10__cxxabiv119__pointer_type_infoE[]; | |
517 | extern __attribute__((used, weak)) const char _ZTSe[2] = "e"; | |
518 | extern __attribute__((used, weak)) const char _ZTSPe[3] = "Pe"; | |
519 | extern __attribute__((used, weak)) const char _ZTSPKe[4] = "PKe"; | |
42016207 | 520 | extern __attribute__((used, weak)) const void * const _ZTIe[2] |
b5ff10f3 UB |
521 | = { reinterpret_cast<const void *> |
522 | (&_ZTVN10__cxxabiv123__fundamental_type_infoE[2]), | |
523 | reinterpret_cast<const void *>(_ZTSe) }; | |
42016207 | 524 | extern __attribute__((used, weak)) const void * const _ZTIPe[4] |
b5ff10f3 UB |
525 | = { reinterpret_cast<const void *> |
526 | (&_ZTVN10__cxxabiv119__pointer_type_infoE[2]), | |
527 | reinterpret_cast<const void *>(_ZTSPe), | |
528 | reinterpret_cast<const void *>(0L), | |
529 | reinterpret_cast<const void *>(_ZTIe) }; | |
42016207 | 530 | extern __attribute__((used, weak)) const void * const _ZTIPKe[4] |
b5ff10f3 UB |
531 | = { reinterpret_cast<const void *> |
532 | (&_ZTVN10__cxxabiv119__pointer_type_infoE[2]), | |
533 | reinterpret_cast<const void *>(_ZTSPKe), | |
534 | reinterpret_cast<const void *>(1L), | |
535 | reinterpret_cast<const void *>(_ZTIe) }; | |
6defecc2 JJ |
536 | #endif // _GLIBCXX_LONG_DOUBLE_COMPAT |
537 | ||
fb5c309d | 538 | #ifdef _GLIBCXX_SYMVER_DARWIN |
ac6d1200 | 539 | #if (defined(__ppc__) || defined(__ppc64__)) && defined(_GLIBCXX_SHARED) |
f9314d01 GK |
540 | /* __eprintf shouldn't have been made visible from libstdc++, or |
541 | anywhere, but on Mac OS X 10.4 it was defined in | |
542 | libstdc++.6.0.3.dylib; so on that platform we have to keep defining | |
543 | it to keep binary compatibility. We can't just put the libgcc | |
544 | version in the export list, because that doesn't work; once a | |
545 | symbol is marked as hidden, it stays that way. */ | |
546 | ||
547 | #include <cstdio> | |
548 | #include <cstdlib> | |
549 | ||
550 | using namespace std; | |
551 | ||
552 | extern "C" void | |
3cbc7af0 BK |
553 | __eprintf(const char *string, const char *expression, |
554 | unsigned int line, const char *filename) | |
f9314d01 | 555 | { |
3cbc7af0 BK |
556 | fprintf(stderr, string, expression, line, filename); |
557 | fflush(stderr); | |
558 | abort(); | |
f9314d01 GK |
559 | } |
560 | #endif | |
fb5c309d | 561 | #endif |