1
/* ***** BEGIN LICENSE BLOCK *****
2
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
4
* The contents of this file are subject to the Mozilla Public License Version
5
* 1.1 (the "License"); you may not use this file except in compliance with
6
* the License. You may obtain a copy of the License at
7
* http://www.mozilla.org/MPL/
9
* Software distributed under the License is distributed on an "AS IS" basis,
10
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11
* for the specific language governing rights and limitations under the
14
* The Original Code is a hack to avoid dependencies on recent libstdc++.
16
* The Initial Developer of the Original Code is
18
* Portions created by the Initial Developer are Copyright (C) 2011
19
* the Initial Developer. All Rights Reserved.
22
* Mike Hommey <mh@glandium.org>
24
* Alternatively, the contents of this file may be used under the terms of
25
* either the GNU General Public License Version 2 or later (the "GPL"), or
26
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27
* in which case the provisions of the GPL or the LGPL are applicable instead
28
* of those above. If you wish to allow use of your version of this file only
29
* under the terms of either the GPL or the LGPL, and not to allow others to
30
* use your version of this file under the terms of the MPL, indicate your
31
* decision by deleting the provisions above and replace them with the notice
32
* and other provisions required by the GPL or the LGPL. If you do not delete
33
* the provisions above, a recipient may use your version of this file under
34
* the terms of any one of the MPL, the GPL or the LGPL.
36
* ***** END LICENSE BLOCK ***** */
45
#if (__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)
46
/* Instantiate these templates to avoid GLIBCXX_3.4.9 symbol versions */
47
template ostream& ostream::_M_insert(double);
48
template ostream& ostream::_M_insert(long);
49
template ostream& ostream::_M_insert(unsigned long);
50
template ostream& __ostream_insert(ostream&, const char*, streamsize);
51
template istream& istream::_M_extract(double&);
54
#if (__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)
55
/* Instantiate these templates to avoid GLIBCXX_3.4.14 symbol versions
57
template char *string::_S_construct_aux_2(size_type, char, allocator<char> const&);
58
#ifdef _GLIBCXX_USE_WCHAR_T
59
template wchar_t *wstring::_S_construct_aux_2(size_type, wchar_t, allocator<wchar_t> const&);
60
#endif /* _GLIBCXX_USE_WCHAR_T */
61
#ifdef __GXX_EXPERIMENTAL_CXX0X__
62
template string::basic_string(string&&);
63
template string& string::operator=(string&&);
64
template wstring::basic_string(wstring&&);
65
template wstring& wstring::operator=(wstring&&);
66
template wstring& wstring::assign(wstring&&);
67
#endif /* __GXX_EXPERIMENTAL_CXX0X__ */
68
#endif /* (__GNUC__ == 4) && (__GNUC_MINOR__ >= 5) */
72
namespace std __attribute__((visibility("default"))) {
73
#if (__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)
74
/* Hack to avoid GLIBCXX_3.4.14 symbol versions */
75
struct _List_node_base
77
void hook(_List_node_base * const __position) throw ();
79
void unhook() throw ();
81
void transfer(_List_node_base * const __first,
82
_List_node_base * const __last) throw();
84
/* Hack to avoid GLIBCXX_3.4.15 symbol versions */
85
#if (__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)
86
static void swap(_List_node_base& __x, _List_node_base& __y) throw ();
91
struct _List_node_base
94
void _M_hook(_List_node_base * const __position) throw ();
96
void _M_unhook() throw ();
98
void _M_transfer(_List_node_base * const __first,
99
_List_node_base * const __last) throw();
101
#if (__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)
102
static void swap(_List_node_base& __x, _List_node_base& __y) throw ();
106
/* The functions actually have the same implementation */
108
_List_node_base::_M_hook(_List_node_base * const __position) throw ()
110
((std::_List_node_base *)this)->hook((std::_List_node_base * const) __position);
114
_List_node_base::_M_unhook() throw ()
116
((std::_List_node_base *)this)->unhook();
120
_List_node_base::_M_transfer(_List_node_base * const __first,
121
_List_node_base * const __last) throw ()
123
((std::_List_node_base *)this)->transfer((std::_List_node_base * const)__first,
124
(std::_List_node_base * const)__last);
127
#if (__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)
129
_List_node_base::swap(_List_node_base& __x, _List_node_base& __y) throw ()
131
std::_List_node_base::swap(*((std::_List_node_base *) &__x),
132
*((std::_List_node_base *) &__y));
137
#endif /* (__GNUC__ == 4) && (__GNUC_MINOR__ >= 5) */
139
#if (__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)
140
/* Hack to avoid GLIBCXX_3.4.11 symbol versions
141
An inline definition of ctype<char>::_M_widen_init() used to be in
142
locale_facets.h before GCC 4.4, but moved out of headers in more
144
It is actually safe to make it do nothing. */
145
void ctype<char>::_M_widen_init() const {}