diff options
author | onqtam <vik.kirilov@gmail.com> | 2021-12-09 14:25:20 +0300 |
---|---|---|
committer | onqtam <vik.kirilov@gmail.com> | 2021-12-11 00:41:29 +0300 |
commit | 9a042a2cb3b3eabc4e0448b76a9bc458c83abbd3 (patch) | |
tree | fc862262f40c826c3118ce8600975e1f98130146 /doctest | |
parent | 48480283c867446af9e2eef1e1d47c2ef5e72b85 (diff) |
added cdecl to two function pointers under windows - fixed #500
Diffstat (limited to 'doctest')
-rw-r--r-- | doctest/doctest.h | 8 | ||||
-rw-r--r-- | doctest/parts/doctest.cpp | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/doctest/doctest.h b/doctest/doctest.h index 3138c880..424dafc5 100644 --- a/doctest/doctest.h +++ b/doctest/doctest.h @@ -2941,6 +2941,10 @@ DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END #define DOCTEST_CONFIG_NO_MULTI_LANE_ATOMICS #endif +#ifndef DOCTEST_CDECL +#define DOCTEST_CDECL __cdecl +#endif + namespace doctest { bool is_running_in_test = false; @@ -4348,7 +4352,7 @@ namespace { static unsigned int prev_abort_behavior; static int prev_report_mode; static _HFILE prev_report_file; - static void (*prev_sigabrt_handler)(int); + static void (DOCTEST_CDECL *prev_sigabrt_handler)(int); static std::terminate_handler original_terminate_handler; static bool isSet; static ULONG guaranteeSize; @@ -4360,7 +4364,7 @@ namespace { unsigned int FatalConditionHandler::prev_abort_behavior; int FatalConditionHandler::prev_report_mode; _HFILE FatalConditionHandler::prev_report_file; - void (*FatalConditionHandler::prev_sigabrt_handler)(int); + void (DOCTEST_CDECL *FatalConditionHandler::prev_sigabrt_handler)(int); std::terminate_handler FatalConditionHandler::original_terminate_handler; bool FatalConditionHandler::isSet = false; ULONG FatalConditionHandler::guaranteeSize = 0; diff --git a/doctest/parts/doctest.cpp b/doctest/parts/doctest.cpp index f608241e..388a14b2 100644 --- a/doctest/parts/doctest.cpp +++ b/doctest/parts/doctest.cpp @@ -197,6 +197,10 @@ DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END #define DOCTEST_CONFIG_NO_MULTI_LANE_ATOMICS #endif +#ifndef DOCTEST_CDECL +#define DOCTEST_CDECL __cdecl +#endif + namespace doctest { bool is_running_in_test = false; @@ -1604,7 +1608,7 @@ namespace { static unsigned int prev_abort_behavior; static int prev_report_mode; static _HFILE prev_report_file; - static void (*prev_sigabrt_handler)(int); + static void (DOCTEST_CDECL *prev_sigabrt_handler)(int); static std::terminate_handler original_terminate_handler; static bool isSet; static ULONG guaranteeSize; @@ -1616,7 +1620,7 @@ namespace { unsigned int FatalConditionHandler::prev_abort_behavior; int FatalConditionHandler::prev_report_mode; _HFILE FatalConditionHandler::prev_report_file; - void (*FatalConditionHandler::prev_sigabrt_handler)(int); + void (DOCTEST_CDECL *FatalConditionHandler::prev_sigabrt_handler)(int); std::terminate_handler FatalConditionHandler::original_terminate_handler; bool FatalConditionHandler::isSet = false; ULONG FatalConditionHandler::guaranteeSize = 0; |