michael@0: /* michael@0: * michael@0: * Copyright (c) 1994 michael@0: * Hewlett-Packard Company michael@0: * michael@0: * Copyright (c) 1996,1997 michael@0: * Silicon Graphics Computer Systems, Inc. michael@0: * michael@0: * Copyright (c) 1997 michael@0: * Moscow Center for SPARC Technology michael@0: * michael@0: * Copyright (c) 1999 michael@0: * Boris Fomitchev michael@0: * michael@0: * This material is provided "as is", with absolutely no warranty expressed michael@0: * or implied. Any use is at your own risk. michael@0: * michael@0: * Permission to use or copy this software for any purpose is hereby granted michael@0: * without fee, provided the above notices are retained on all copies. michael@0: * Permission to modify the code and to distribute modified code is granted, michael@0: * provided the above notices are retained, and a notice that the code was michael@0: * modified is included with the above copyright notice. michael@0: * michael@0: */ michael@0: michael@0: #define _STLP_EXPOSE_GLOBALS_IMPLEMENTATION michael@0: michael@0: #include "stlport_prefix.h" michael@0: michael@0: #if !defined (_STLP_DEBUG) && ! defined (_STLP_ASSERTIONS) michael@0: # if !defined (__APPLE__) || !defined (__GNUC__) || (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3)) michael@0: /* dums: Please if the following code was being uncommented please explain why michael@0: * as for the moment it only looks like a source of inconsistency in the way michael@0: * STLport different translation units are compiled. michael@0: */ michael@0: //# define _STLP_ASSERTIONS 1 michael@0: # endif michael@0: #endif michael@0: michael@0: #include michael@0: #include michael@0: #include michael@0: #include michael@0: #include michael@0: #include michael@0: #include michael@0: #include michael@0: #include michael@0: #include michael@0: #include michael@0: #include michael@0: #include michael@0: michael@0: #if defined (__DMC__) michael@0: // for rope static members michael@0: # include michael@0: #endif michael@0: michael@0: #include michael@0: michael@0: _STLP_BEGIN_NAMESPACE michael@0: michael@0: #if defined (_STLP_NO_EXCEPTION_HEADER) || defined (_STLP_BROKEN_EXCEPTION_CLASS) michael@0: exception::exception() _STLP_NOTHROW {} michael@0: exception::~exception() _STLP_NOTHROW {} michael@0: bad_exception::bad_exception() _STLP_NOTHROW {} michael@0: bad_exception::~bad_exception() _STLP_NOTHROW {} michael@0: const char* exception::what() const _STLP_NOTHROW { return "class exception"; } michael@0: const char* bad_exception::what() const _STLP_NOTHROW { return "class bad_exception"; } michael@0: #endif michael@0: michael@0: #if defined (_STLP_OWN_STDEXCEPT) michael@0: # include michael@0: michael@0: // boris : those are needed to force typeinfo nodes to be created in here only michael@0: logic_error::~logic_error() _STLP_NOTHROW_INHERENTLY {} michael@0: runtime_error::~runtime_error() _STLP_NOTHROW_INHERENTLY {} michael@0: domain_error::~domain_error() _STLP_NOTHROW_INHERENTLY {} michael@0: invalid_argument::~invalid_argument() _STLP_NOTHROW_INHERENTLY {} michael@0: length_error::~length_error() _STLP_NOTHROW_INHERENTLY {} michael@0: out_of_range::~out_of_range() _STLP_NOTHROW_INHERENTLY {} michael@0: range_error::~range_error() _STLP_NOTHROW_INHERENTLY {} michael@0: overflow_error::~overflow_error() _STLP_NOTHROW_INHERENTLY {} michael@0: underflow_error::~underflow_error() _STLP_NOTHROW_INHERENTLY {} michael@0: michael@0: #endif michael@0: michael@0: #if !defined(_STLP_WCE_EVC3) michael@0: # if defined (_STLP_NO_BAD_ALLOC) michael@0: const nothrow_t nothrow /* = {} */; michael@0: # endif michael@0: #endif michael@0: michael@0: #if !defined (_STLP_NO_FORCE_INSTANTIATE) michael@0: michael@0: # if defined (_STLP_DEBUG) || defined (_STLP_ASSERTIONS) michael@0: _STLP_MOVE_TO_PRIV_NAMESPACE michael@0: template class _STLP_CLASS_DECLSPEC __stl_debug_engine; michael@0: _STLP_MOVE_TO_STD_NAMESPACE michael@0: # endif michael@0: michael@0: template class _STLP_CLASS_DECLSPEC __debug_alloc<__node_alloc>; michael@0: template class _STLP_CLASS_DECLSPEC __debug_alloc<__new_alloc>; michael@0: michael@0: //Export of the types used to represent buckets in the hashtable implementation. michael@0: /* michael@0: * For the vector class we do not use any MSVC6 workaround even if we export it from michael@0: * the STLport dynamic libraries because we know what methods are called and none is michael@0: * a template method. Moreover the exported class is an instanciation of vector with michael@0: * _Slist_node_base struct that is an internal STLport class that no user should ever michael@0: * use. michael@0: */ michael@0: # if !defined (_STLP_USE_PTR_SPECIALIZATIONS) michael@0: template class _STLP_CLASS_DECLSPEC allocator<_STLP_PRIV _Slist_node_base*>; michael@0: michael@0: _STLP_MOVE_TO_PRIV_NAMESPACE michael@0: template class _STLP_CLASS_DECLSPEC _STLP_alloc_proxy<_Slist_node_base**, _Slist_node_base*, michael@0: allocator<_Slist_node_base*> >; michael@0: template class _STLP_CLASS_DECLSPEC _Vector_base<_Slist_node_base*, michael@0: allocator<_Slist_node_base*> >; michael@0: _STLP_MOVE_TO_STD_NAMESPACE michael@0: # endif michael@0: michael@0: # if defined (_STLP_DEBUG) michael@0: _STLP_MOVE_TO_PRIV_NAMESPACE michael@0: template class _STLP_CLASS_DECLSPEC _STLP_NON_DBG_NAME(vector)<_Slist_node_base*, michael@0: allocator<_Slist_node_base*> >; michael@0: _STLP_MOVE_TO_STD_NAMESPACE michael@0: # endif michael@0: michael@0: template class _STLP_CLASS_DECLSPEC vector<_STLP_PRIV _Slist_node_base*, michael@0: allocator<_STLP_PRIV _Slist_node_base*> >; michael@0: //End of hashtable bucket types export. michael@0: michael@0: //Export of _Locale_impl facets container: michael@0: # if !defined (_STLP_USE_PTR_SPECIALIZATIONS) michael@0: template class _STLP_CLASS_DECLSPEC allocator; michael@0: michael@0: _STLP_MOVE_TO_PRIV_NAMESPACE michael@0: template class _STLP_CLASS_DECLSPEC _STLP_alloc_proxy >; michael@0: template class _STLP_CLASS_DECLSPEC _Vector_base >; michael@0: _STLP_MOVE_TO_STD_NAMESPACE michael@0: michael@0: # endif michael@0: # if defined (_STLP_DEBUG) michael@0: _STLP_MOVE_TO_PRIV_NAMESPACE michael@0: # define _STLP_NON_DBG_VECTOR _STLP_NON_DBG_NAME(vector) michael@0: template class _STLP_CLASS_DECLSPEC __construct_checker<_STLP_PRIV _STLP_NON_DBG_VECTOR > >; michael@0: template class _STLP_CLASS_DECLSPEC _STLP_NON_DBG_VECTOR >; michael@0: # undef _STLP_NON_DBG_VECTOR michael@0: _STLP_MOVE_TO_STD_NAMESPACE michael@0: # endif michael@0: michael@0: template class _STLP_CLASS_DECLSPEC vector >; michael@0: //End of export of _Locale_impl facets container. michael@0: michael@0: # if defined (_STLP_USE_PTR_SPECIALIZATIONS) michael@0: template class _STLP_CLASS_DECLSPEC allocator; michael@0: michael@0: typedef _STLP_PRIV _List_node _VoidPtr_Node; michael@0: template class _STLP_CLASS_DECLSPEC allocator<_VoidPtr_Node>; michael@0: michael@0: _STLP_MOVE_TO_PRIV_NAMESPACE michael@0: michael@0: template class _STLP_CLASS_DECLSPEC _STLP_alloc_proxy >; michael@0: template class _STLP_CLASS_DECLSPEC _Vector_base >; michael@0: template class _STLP_CLASS_DECLSPEC _STLP_PTR_IMPL_NAME(vector) >; michael@0: michael@0: template class _STLP_CLASS_DECLSPEC _List_node; michael@0: template class _STLP_CLASS_DECLSPEC _STLP_alloc_proxy<_List_node_base, _VoidPtr_Node, allocator<_VoidPtr_Node> >; michael@0: template class _STLP_CLASS_DECLSPEC _List_base >; michael@0: template class _STLP_CLASS_DECLSPEC _STLP_PTR_IMPL_NAME(list) >; michael@0: michael@0: template class _STLP_CLASS_DECLSPEC _Slist_node; michael@0: template class _STLP_CLASS_DECLSPEC _STLP_alloc_proxy<_Slist_node_base, _Slist_node, allocator<_Slist_node > >; michael@0: template class _STLP_CLASS_DECLSPEC _Slist_base >; michael@0: template class _STLP_CLASS_DECLSPEC _STLP_PTR_IMPL_NAME(slist) >; michael@0: michael@0: template class _STLP_CLASS_DECLSPEC _STLP_alloc_proxy >; michael@0: template class _STLP_CLASS_DECLSPEC _STLP_alloc_proxy >; michael@0: template struct _STLP_CLASS_DECLSPEC _Deque_iterator >; michael@0: template class _STLP_CLASS_DECLSPEC _Deque_base >; michael@0: template class _STLP_CLASS_DECLSPEC _STLP_PTR_IMPL_NAME(deque) >; michael@0: michael@0: _STLP_MOVE_TO_STD_NAMESPACE michael@0: michael@0: # endif /* _STLP_USE_PTR_SPECIALIZATIONS */ michael@0: michael@0: _STLP_MOVE_TO_PRIV_NAMESPACE michael@0: michael@0: template class _STLP_CLASS_DECLSPEC _Rb_global; michael@0: template class _STLP_CLASS_DECLSPEC _List_global; michael@0: michael@0: template class _STLP_CLASS_DECLSPEC _Sl_global; michael@0: template class _STLP_CLASS_DECLSPEC _Stl_prime; michael@0: michael@0: template class _STLP_CLASS_DECLSPEC _LimG; michael@0: michael@0: _STLP_MOVE_TO_STD_NAMESPACE michael@0: michael@0: #endif /* _STLP_NO_FORCE_INSTANTIATE */ michael@0: michael@0: _STLP_END_NAMESPACE michael@0: michael@0: #if defined (_STLP_SIGNAL_RUNTIME_COMPATIBILITY) michael@0: extern "C" void _STLP_DECLSPEC _STLP_CALL _STLP_SIGNAL_RUNTIME_COMPATIBILITY() {} michael@0: #endif michael@0: michael@0: #define FORCE_SYMBOL extern michael@0: michael@0: #if defined (_WIN32) && defined (_STLP_USE_DECLSPEC) && !defined (_STLP_USE_STATIC_LIB) michael@0: // stlportmt.cpp : Defines the entry point for the DLL application. michael@0: // michael@0: # undef FORCE_SYMBOL michael@0: # define FORCE_SYMBOL APIENTRY michael@0: michael@0: extern "C" { michael@0: michael@0: BOOL APIENTRY DllMain( HANDLE hModule, michael@0: DWORD ul_reason_for_call, michael@0: LPVOID) { michael@0: switch (ul_reason_for_call) { michael@0: case DLL_PROCESS_ATTACH: michael@0: DisableThreadLibraryCalls((HINSTANCE)hModule); michael@0: case DLL_THREAD_ATTACH: michael@0: case DLL_THREAD_DETACH: michael@0: case DLL_PROCESS_DETACH: michael@0: break; michael@0: } michael@0: return TRUE; michael@0: } michael@0: michael@0: } /* extern "C" */ michael@0: michael@0: #if !defined (_STLP_MSVC) && !defined (__MINGW32__) michael@0: _STLP_BEGIN_NAMESPACE michael@0: michael@0: static void FORCE_SYMBOL michael@0: force_link() { michael@0: set::iterator iter; michael@0: // _M_increment; _M_decrement instantiation michael@0: ++iter; michael@0: --iter; michael@0: } michael@0: michael@0: _STLP_END_NAMESPACE michael@0: #endif michael@0: michael@0: #endif /* _WIN32 */ michael@0: michael@0: #if defined (__ICL) && (__ICL >= 900) && (_STLP_MSVC_LIB < 1300) michael@0: # undef std michael@0: michael@0: namespace std michael@0: { michael@0: void _STLP_CALL unexpected() { michael@0: unexpected_handler hdl; michael@0: set_unexpected(hdl = set_unexpected((unexpected_handler)0)); michael@0: hdl(); michael@0: } michael@0: } michael@0: #endif