michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include michael@0: #include michael@0: #include michael@0: michael@0: /* GLIBCXX_3.4.8 is from gcc 4.1.1 (111691) michael@0: GLIBCXX_3.4.9 is from gcc 4.2.0 (111690) michael@0: GLIBCXX_3.4.10 is from gcc 4.3.0 (126287) michael@0: GLIBCXX_3.4.11 is from gcc 4.4.0 (133006) michael@0: GLIBCXX_3.4.12 is from gcc 4.4.1 (147138) michael@0: GLIBCXX_3.4.13 is from gcc 4.4.2 (151127) michael@0: GLIBCXX_3.4.14 is from gcc 4.5.0 (151126) michael@0: GLIBCXX_3.4.15 is from gcc 4.6.0 (160071) michael@0: GLIBCXX_3.4.16 is form gcc 4.6.1 (172240) */ michael@0: michael@0: #define GLIBCXX_VERSION(a, b, c) (((a) << 16) | ((b) << 8) | (c)) michael@0: michael@0: namespace std { michael@0: #if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 9) michael@0: /* Instantiate these templates to avoid GLIBCXX_3.4.9 symbol versions */ michael@0: template ostream& ostream::_M_insert(double); michael@0: template ostream& ostream::_M_insert(long); michael@0: template ostream& ostream::_M_insert(unsigned long); michael@0: template ostream& ostream::_M_insert(long long); michael@0: template ostream& ostream::_M_insert(unsigned long long); michael@0: template ostream& ostream::_M_insert(bool); michael@0: template ostream& ostream::_M_insert(const void*); michael@0: template ostream& __ostream_insert(ostream&, const char*, streamsize); michael@0: template istream& istream::_M_extract(double&); michael@0: template istream& istream::_M_extract(float&); michael@0: template istream& istream::_M_extract(unsigned int&); michael@0: template istream& istream::_M_extract(unsigned long&); michael@0: template istream& istream::_M_extract(unsigned short&); michael@0: template istream& istream::_M_extract(unsigned long long&); michael@0: #endif michael@0: #if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 14) michael@0: /* Instantiate these templates to avoid GLIBCXX_3.4.14 symbol versions michael@0: * depending on optimization level */ michael@0: template char *string::_S_construct_aux_2(size_type, char, allocator const&); michael@0: #ifdef _GLIBCXX_USE_WCHAR_T michael@0: template wchar_t *wstring::_S_construct_aux_2(size_type, wchar_t, allocator const&); michael@0: #endif /* _GLIBCXX_USE_WCHAR_T */ michael@0: #ifdef __GXX_EXPERIMENTAL_CXX0X__ michael@0: template string::basic_string(string&&); michael@0: template string& string::operator=(string&&); michael@0: template wstring::basic_string(wstring&&); michael@0: template wstring& wstring::operator=(wstring&&); michael@0: template string& string::assign(string&&); michael@0: template wstring& wstring::assign(wstring&&); michael@0: #endif /* __GXX_EXPERIMENTAL_CXX0X__ */ michael@0: #endif /* (__GNUC__ == 4) && (__GNUC_MINOR__ >= 5) */ michael@0: } michael@0: michael@0: namespace std __attribute__((visibility("default"))) { michael@0: #if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 14) michael@0: /* Hack to avoid GLIBCXX_3.4.14 symbol versions */ michael@0: struct _List_node_base michael@0: { michael@0: void hook(_List_node_base * const __position) throw (); michael@0: michael@0: void unhook() throw (); michael@0: michael@0: void transfer(_List_node_base * const __first, michael@0: _List_node_base * const __last) throw(); michael@0: michael@0: void reverse() throw(); michael@0: michael@0: /* Hack to avoid GLIBCXX_3.4.15 symbol versions */ michael@0: #if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 15) michael@0: static void swap(_List_node_base& __x, _List_node_base& __y) throw (); michael@0: }; michael@0: michael@0: namespace __detail { michael@0: michael@0: struct _List_node_base michael@0: { michael@0: #endif michael@0: void _M_hook(_List_node_base * const __position) throw (); michael@0: michael@0: void _M_unhook() throw (); michael@0: michael@0: void _M_transfer(_List_node_base * const __first, michael@0: _List_node_base * const __last) throw(); michael@0: michael@0: void _M_reverse() throw(); michael@0: michael@0: #if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 15) michael@0: static void swap(_List_node_base& __x, _List_node_base& __y) throw (); michael@0: #endif michael@0: }; michael@0: michael@0: /* The functions actually have the same implementation */ michael@0: void michael@0: _List_node_base::_M_hook(_List_node_base * const __position) throw () michael@0: { michael@0: ((std::_List_node_base *)this)->hook((std::_List_node_base * const) __position); michael@0: } michael@0: michael@0: void michael@0: _List_node_base::_M_unhook() throw () michael@0: { michael@0: ((std::_List_node_base *)this)->unhook(); michael@0: } michael@0: michael@0: void michael@0: _List_node_base::_M_transfer(_List_node_base * const __first, michael@0: _List_node_base * const __last) throw () michael@0: { michael@0: ((std::_List_node_base *)this)->transfer((std::_List_node_base * const)__first, michael@0: (std::_List_node_base * const)__last); michael@0: } michael@0: michael@0: void michael@0: _List_node_base::_M_reverse() throw () michael@0: { michael@0: ((std::_List_node_base *)this)->reverse(); michael@0: } michael@0: michael@0: #if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 15) michael@0: void michael@0: _List_node_base::swap(_List_node_base& __x, _List_node_base& __y) throw () michael@0: { michael@0: std::_List_node_base::swap(*((std::_List_node_base *) &__x), michael@0: *((std::_List_node_base *) &__y)); michael@0: } michael@0: } michael@0: #endif michael@0: michael@0: #endif /*MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 14)*/ michael@0: michael@0: #if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 11) michael@0: /* Hack to avoid GLIBCXX_3.4.11 symbol versions michael@0: An inline definition of ctype::_M_widen_init() used to be in michael@0: locale_facets.h before GCC 4.4, but moved out of headers in more michael@0: recent versions. michael@0: It is actually safe to make it do nothing. */ michael@0: void ctype::_M_widen_init() const {} michael@0: #endif michael@0: michael@0: }