From e389d927527dcac950b776e6f610e5c1c4c4ecae Mon Sep 17 00:00:00 2001
From: John Maddock
Date: Sat, 24 Dec 2011 18:04:37 +0000
Subject: [PATCH] Add BOOST_REGEX_NO_FASTCALL config macro and regenerate docs.
Fixes #6245.
[SVN r76140]
---
doc/configuration.qbk | 1 +
doc/html/boost_regex/configuration/linkage.html | 15 +++++++++++++++
doc/html/index.html | 2 +-
include/boost/regex/config.hpp | 2 +-
include/boost/regex/user.hpp | 3 +++
5 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/doc/configuration.qbk b/doc/configuration.qbk
index 2acb55bb..411f0722 100644
--- a/doc/configuration.qbk
+++ b/doc/configuration.qbk
@@ -38,6 +38,7 @@ the user's locale:
[[macro][description]]
[[BOOST_REGEX_DYN_LINK][For Microsoft and Borland C++ builds, this tells Boost.Regex that it should link to the dll build of the Boost.Regex. By default boost.regex will link to its static library build, even if the dynamic C runtime library is in use.]]
[[BOOST_REGEX_NO_LIB][For Microsoft and Borland C++ builds, this tells Boost.Regex that it should not automatically select the library to link to.]]
+[[BOOST_REGEX_NO_FASTCALL][For Microsoft builds, this tells Boost.Regex to use the `__cdecl` calling convention rather than `__fastcall`. Useful if you want to use the same library from both managed and unmanaged code.]]
]
[endsect]
diff --git a/doc/html/boost_regex/configuration/linkage.html b/doc/html/boost_regex/configuration/linkage.html
index 44ec8fb4..8bdb102d 100644
--- a/doc/html/boost_regex/configuration/linkage.html
+++ b/doc/html/boost_regex/configuration/linkage.html
@@ -72,6 +72,21 @@
+
+
+
+ BOOST_REGEX_NO_FASTCALL
+
+ |
+
+
+ For Microsoft builds, this tells Boost.Regex to use the __cdecl calling convention rather
+ than __fastcall .
+ Useful if you want to use the same library from both managed and
+ unmanaged code.
+
+ |
+
diff --git a/doc/html/index.html b/doc/html/index.html
index 816b8069..ab6d8354 100644
--- a/doc/html/index.html
+++ b/doc/html/index.html
@@ -198,7 +198,7 @@
-Last revised: December 24, 2011 at 17:50:34 GMT |
+Last revised: December 24, 2011 at 18:02:12 GMT |
|
diff --git a/include/boost/regex/config.hpp b/include/boost/regex/config.hpp
index 3b92e6ae..6b7db45d 100644
--- a/include/boost/regex/config.hpp
+++ b/include/boost/regex/config.hpp
@@ -222,7 +222,7 @@
****************************************************************************/
#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1200) && defined(_MSC_EXTENSIONS)
-#if defined(_DEBUG) || defined(__MSVC_RUNTIME_CHECKS) || defined(_MANAGED)
+#if defined(_DEBUG) || defined(__MSVC_RUNTIME_CHECKS) || defined(_MANAGED) || defined(BOOST_REGEX_NO_FASTCALL)
# define BOOST_REGEX_CALL __cdecl
#else
# define BOOST_REGEX_CALL __fastcall
diff --git a/include/boost/regex/user.hpp b/include/boost/regex/user.hpp
index 95908173..33b10136 100644
--- a/include/boost/regex/user.hpp
+++ b/include/boost/regex/user.hpp
@@ -88,3 +88,6 @@
// define this if you want to enable support for Unicode via ICU.
// #define BOOST_HAS_ICU
+
+// define this if you want regex to use __cdecl calling convensions, even when __fastcall is available:
+// #define BOOST_REGEX_NO_FASTCALL