From 31646aefa7058bd49bb3e7c6829dcbc6d3a1aa50 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Sun, 19 Apr 2020 15:29:03 -0400 Subject: [PATCH] Always use __cdecl as the calling convention for the Embarcadero C++ clang-based compilers --- example/snippets/regex_grep_example_4.cpp | 2 +- include/boost/regex/config.hpp | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/example/snippets/regex_grep_example_4.cpp b/example/snippets/regex_grep_example_4.cpp index 7a2d0bd1..e50383b3 100644 --- a/example/snippets/regex_grep_example_4.cpp +++ b/example/snippets/regex_grep_example_4.cpp @@ -17,7 +17,7 @@ * using a C++ Builder closure as a callback. */ -#ifdef __BORLANDC__ && !defined(__clang__) +#if defined(__BORLANDC__) && !defined(__clang__) #include #include diff --git a/include/boost/regex/config.hpp b/include/boost/regex/config.hpp index 692712f5..9b75d507 100644 --- a/include/boost/regex/config.hpp +++ b/include/boost/regex/config.hpp @@ -278,10 +278,15 @@ # define BOOST_REGEX_CCALL __cdecl #endif -#if defined(__BORLANDC__) && !defined(__clang__) && !defined(BOOST_DISABLE_WIN32) +#if defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32) +#if defined(__clang__) +# define BOOST_REGEX_CALL __cdecl +# define BOOST_REGEX_CCALL __cdecl +#else # define BOOST_REGEX_CALL __fastcall # define BOOST_REGEX_CCALL __stdcall #endif +#endif #ifndef BOOST_REGEX_CALL # define BOOST_REGEX_CALL