Pyrogenesis  trunk
osx_stl_fixes.h
Go to the documentation of this file.
1 /* Copyright (c) 2013 Wildfire Games
2  *
3  * Permission is hereby granted, free of charge, to any person obtaining
4  * a copy of this software and associated documentation files (the
5  * "Software"), to deal in the Software without restriction, including
6  * without limitation the rights to use, copy, modify, merge, publish,
7  * distribute, sublicense, and/or sell copies of the Software, and to
8  * permit persons to whom the Software is furnished to do so, subject to
9  * the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included
12  * in all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21  */
22 
23 #ifndef OSX_STL_FIXES_H
24 #define OSX_STL_FIXES_H
25 
26 #include <istream>
27 #include <ostream>
28 #include <AvailabilityMacros.h> // MAC_OS_X_VERSION_*
29 
30 /**
31  * This file adds some explicit template instantiations that are
32  * declared external on 10.6+ SDKs but are missing from stdc++ on 10.5
33  * (this causes a failure to load due to missing symbols on 10.5)
34  **/
35 
36 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 && MAC_OS_X_VERSION_MIN_REQUIRED < 1060
37 
38 _GLIBCXX_BEGIN_NAMESPACE(std)
39 
40 
41 // ostream_insert.h:
42 # if _GLIBCXX_EXTERN_TEMPLATE
43  template ostream& __ostream_insert(ostream&, const char*, streamsize);
44 # ifdef _GLIBCXX_USE_WCHAR_T
45  template wostream& __ostream_insert(wostream&, const wchar_t*,
46  streamsize);
47 # endif
48 # endif
49 
50 
51 // istream.tcc:
52 # if _GLIBCXX_EXTERN_TEMPLATE
53  template istream& istream::_M_extract(unsigned short&);
54  template istream& istream::_M_extract(unsigned int&);
55  template istream& istream::_M_extract(long&);
56  template istream& istream::_M_extract(unsigned long&);
57  template istream& istream::_M_extract(bool&);
58 # ifdef _GLIBCXX_USE_LONG_LONG
59  template istream& istream::_M_extract(long long&);
60  template istream& istream::_M_extract(unsigned long long&);
61 # endif
62  template istream& istream::_M_extract(float&);
63  template istream& istream::_M_extract(double&);
64  template istream& istream::_M_extract(long double&);
65  template istream& istream::_M_extract(void*&);
66 
67  template class basic_iostream<char>;
68 
69 # ifdef _GLIBCXX_USE_WCHAR_T
70  template wistream& wistream::_M_extract(unsigned short&);
71  template wistream& wistream::_M_extract(unsigned int&);
72  template wistream& wistream::_M_extract(long&);
73  template wistream& wistream::_M_extract(unsigned long&);
74  template wistream& wistream::_M_extract(bool&);
75 # ifdef _GLIBCXX_USE_LONG_LONG
76  template wistream& wistream::_M_extract(long long&);
77  template wistream& wistream::_M_extract(unsigned long long&);
78 # endif
79  template wistream& wistream::_M_extract(float&);
80  template wistream& wistream::_M_extract(double&);
81  template wistream& wistream::_M_extract(long double&);
82  template wistream& wistream::_M_extract(void*&);
83 
84  template class basic_iostream<wchar_t>;
85 # endif
86 # endif
87 
88 
89 // ostream.tcc:
90 # if _GLIBCXX_EXTERN_TEMPLATE
91  template ostream& ostream::_M_insert(long);
92  template ostream& ostream::_M_insert(unsigned long);
93  template ostream& ostream::_M_insert(bool);
94 # ifdef _GLIBCXX_USE_LONG_LONG
95  template ostream& ostream::_M_insert(long long);
96  template ostream& ostream::_M_insert(unsigned long long);
97 # endif
98  template ostream& ostream::_M_insert(double);
99  template ostream& ostream::_M_insert(long double);
100  template ostream& ostream::_M_insert(const void*);
101 
102 # ifdef _GLIBCXX_USE_WCHAR_T
103  template wostream& wostream::_M_insert(long);
104  template wostream& wostream::_M_insert(unsigned long);
105  template wostream& wostream::_M_insert(bool);
106 # ifdef _GLIBCXX_USE_LONG_LONG
107  template wostream& wostream::_M_insert(long long);
108  template wostream& wostream::_M_insert(unsigned long long);
109 # endif
110  template wostream& wostream::_M_insert(double);
111  template wostream& wostream::_M_insert(long double);
112  template wostream& wostream::_M_insert(const void*);
113 # endif
114 # endif
115 
116 
117 _GLIBCXX_END_NAMESPACE
118 
119 #endif // MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 && MAC_OS_X_VERSION_MIN_REQUIRED < 1060
120 
121 #endif // OSX_STL_FIXES_H
Definition: unique_range.h:196