diff --git a/include/boost/regex/detail/regex_config.hpp b/include/boost/regex/detail/regex_config.hpp index a2286649..69b591d9 100644 --- a/include/boost/regex/detail/regex_config.hpp +++ b/include/boost/regex/detail/regex_config.hpp @@ -121,8 +121,12 @@ full list of macros and their usage. #define BOOST_RE_CALL #define BOOST_RE_CCALL #else - #define BOOST_RE_CALL __fastcall - #define BOOST_RE_CCALL __stdcall + #ifndef BOOST_RE_CALL + #define BOOST_RE_CALL __fastcall + #endif + #ifndef BOOST_RE_CCALL + #define BOOST_RE_CCALL __stdcall + #endif #endif #define BOOST_RE_NO_CAT @@ -160,12 +164,16 @@ full list of macros and their usage. // // only want "real" Visual C++ here: #if defined(BOOST_MSVC) && !defined(__WATCOMC__) && !defined(__BORLANDC__) && !defined(__GNUC__) && !defined(__MWERKS__) && !defined (__ICL) - #ifdef _DEBUG - #define BOOST_RE_CALL __cdecl - #else - #define BOOST_RE_CALL __fastcall -#endif - #define BOOST_RE_CCALL __stdcall + #ifndef BOOST_RE_CALL + #ifdef _DEBUG + #define BOOST_RE_CALL __cdecl + #else + #define BOOST_RE_CALL __fastcall + #endif + #endif + #ifndef BOOST_RE_CCALL + #define BOOST_RE_CCALL __stdcall + #endif #if BOOST_MSVC < 1100 #define BOOST_RE_NO_NAMESPACES @@ -207,7 +215,7 @@ full list of macros and their usage. // // import export options: - #if defined(_DLL) && !defined(BOOST_RE_STATIC_LIB) + #if defined(_DLL) && !defined(BOOST_RE_STATIC_LIB) && !defined(BOOST_RE_NO_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) diff --git a/src/c_regex_traits.cpp b/src/c_regex_traits.cpp index 62692a55..80ac6862 100644 --- a/src/c_regex_traits.cpp +++ b/src/c_regex_traits.cpp @@ -403,7 +403,7 @@ namespace re_detail{ char c_traits_base::regex_message_catalogue[200] = {0}; -std::string c_traits_base::error_string(unsigned id) +std::string BOOST_RE_CALL c_traits_base::error_string(unsigned id) { return re_get_error_str(id); } @@ -527,7 +527,7 @@ bool BOOST_RE_CALL c_traits_base::do_lookup_collate(std::string& buf, const char return result; } -std::string c_traits_base::set_message_catalogue(const std::string& l) +std::string BOOST_RE_CALL c_traits_base::set_message_catalogue(const std::string& l) { if(sizeof(regex_message_catalogue) <= l.size()) return l; @@ -571,7 +571,7 @@ bool BOOST_RE_CALL c_regex_traits::lookup_collatename(std::basic_string c_regex_traits c_regex_traits::i; -void c_regex_traits::init() +void BOOST_RE_CALL c_regex_traits::init() { BOOST_RE_GUARD_STACK #ifdef BOOST_RE_THREADS