diff options
Diffstat (limited to 'sal/rtl/source')
-rw-r--r-- | sal/rtl/source/bootstrap.cxx | 5 | ||||
-rw-r--r-- | sal/rtl/source/unload.cxx | 20 |
2 files changed, 25 insertions, 0 deletions
diff --git a/sal/rtl/source/bootstrap.cxx b/sal/rtl/source/bootstrap.cxx index 860bf1467c41..103a25c6a2bb 100644 --- a/sal/rtl/source/bootstrap.cxx +++ b/sal/rtl/source/bootstrap.cxx @@ -606,10 +606,15 @@ namespace { struct bootstrap_map { // map<> may be preferred here, but hash_map<> is implemented fully inline, // thus there is no need to link against the stlport: +#ifdef USE_MSVC_HASH_MAP + typedef std::hash_map< + rtl::OUString, Bootstrap_Impl *> t; +#else typedef std::hash_map< rtl::OUString, Bootstrap_Impl *, rtl::OUStringHash, std::equal_to< rtl::OUString >, rtl::Allocator< OUString > > t; +#endif // get and release must only be called properly synchronized via some mutex // (e.g., osl::Mutex::getGlobalMutex()): diff --git a/sal/rtl/source/unload.cxx b/sal/rtl/source/unload.cxx index 18bedabc9bd9..0677ae6f8e2d 100644 --- a/sal/rtl/source/unload.cxx +++ b/sal/rtl/source/unload.cxx @@ -157,6 +157,19 @@ struct hashModule } }; +#ifdef USE_MSVC_HASH_MAP +namespace stdext +{ + inline size_t hash_value( const oslModule& rkey) + { + return (size_t)rkey; + } +} + +typedef std::hash_map< + oslModule, + std::pair<sal_uInt32, component_canUnloadFunc> > ModuleMap; +#else typedef std::hash_map< oslModule, std::pair<sal_uInt32, component_canUnloadFunc>, @@ -164,6 +177,7 @@ typedef std::hash_map< std::equal_to<oslModule>, rtl::Allocator<oslModule> > ModuleMap; +#endif typedef ModuleMap::iterator Mod_IT; @@ -306,6 +320,11 @@ struct hashListener } }; +#ifdef USE_MSVC_HASH_MAP +typedef std::hash_map< + sal_Int32, + std::pair<rtl_unloadingListenerFunc, void*> > ListenerMap; +#else typedef std::hash_map< sal_Int32, std::pair<rtl_unloadingListenerFunc, void*>, @@ -313,6 +332,7 @@ typedef std::hash_map< std::equal_to<sal_Int32>, rtl::Allocator<sal_Int32> > ListenerMap; +#endif typedef ListenerMap::iterator Lis_IT; |