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