From dcb64d5db70bf89f445195dc244134d594d147d5 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 9 Apr 2001 11:19:12 +0000 Subject: [PATCH] Fixed VC6.sp5 support, added support for mixed static/dynamic linking with VC6 [SVN r9744] --- include/boost/re_detail/regex_config.hpp | 5 +---- include/boost/re_detail/regex_kmp.hpp | 4 ++-- include/boost/re_detail/regex_library_include.hpp | 8 ++++++++ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/include/boost/re_detail/regex_config.hpp b/include/boost/re_detail/regex_config.hpp index a625b769..8d9a7acb 100644 --- a/include/boost/re_detail/regex_config.hpp +++ b/include/boost/re_detail/regex_config.hpp @@ -221,7 +221,7 @@ Do not change this file unless you really really have to, add options to // // import export options: - #ifdef _DLL + #if defined(_DLL) && !defined(BOOST_RE_STATIC_LIB) #ifdef BOOST_RE_BUILD_DLL #define BOOST_RE_IX_DECL __declspec( dllexport ) #elif !defined(BOOST_REGEX_LIBRARY_INCLUDE_HPP) && !defined(BOOST_RE_NO_LIB) @@ -440,9 +440,6 @@ typedef unsigned long jm_uintfast32_t; #define BOOST_RE_NO_TRICKY_DEFAULT_PARAM #define BOOST_RE_NO_STRING_DEF_ARGS #endif - #ifndef __STL_USE_EXCEPTIONS - #error exception handling support required - #endif #include #include diff --git a/include/boost/re_detail/regex_kmp.hpp b/include/boost/re_detail/regex_kmp.hpp index 74ed3aaf..b82539e6 100644 --- a/include/boost/re_detail/regex_kmp.hpp +++ b/include/boost/re_detail/regex_kmp.hpp @@ -51,14 +51,14 @@ struct kmp_info }; template -void kmp_free(kmp_info* pinfo, Allocator a) +void kmp_free(kmp_info* pinfo, const Allocator& a) { typedef BOOST_RE_MAYBE_TYPENAME REBIND_TYPE(char, Allocator) atype; atype(a).deallocate((char*)pinfo, pinfo->size); } template -kmp_info* kmp_compile(iterator first, iterator last, charT, Trans translate, Allocator a) +kmp_info* kmp_compile(iterator first, iterator last, charT, Trans translate, const Allocator& a) { typedef BOOST_RE_MAYBE_TYPENAME REBIND_TYPE(char, Allocator) atype; int i, j, m; diff --git a/include/boost/re_detail/regex_library_include.hpp b/include/boost/re_detail/regex_library_include.hpp index 9e5c8514..5a4ac226 100644 --- a/include/boost/re_detail/regex_library_include.hpp +++ b/include/boost/re_detail/regex_library_include.hpp @@ -30,10 +30,14 @@ #if defined(BOOST_MSVC) && !defined(BOOST_RE_BUILD_DLL) #ifdef __SGI_STL_PORT #ifdef _DLL + // All these are multithreaded: #if defined(_DEBUG) && defined(__STL_DEBUG) #pragma comment(lib, "vc6-stlport-re300ddl.lib") #elif defined(_DEBUG) #pragma comment(lib, "vc6-stlport-re300dl.lib") + #elif defined(BOOST_RE_STATIC_LIB) + // static regex lib, dll runtime + #pragma comment(lib, "vc6-stlport-re300ls.lib") #else // DEBUG #pragma comment(lib, "vc6-stlport-re300l.lib") #endif // _DEBUG @@ -53,8 +57,12 @@ #endif //_DLL #else #ifdef _DLL + // All these are multithreaded: #ifdef _DEBUG #pragma comment(lib, "vc6-re300dl.lib") + #elif defined(BOOST_RE_STATIC_LIB) + // static regex lib, dll runtime + #pragma comment(lib, "vc6-re300ls.lib") #else // DEBUG #pragma comment(lib, "vc6-re300l.lib") #endif // _DEBUG