From 88acbce1e9a601bcbd6b741631eeae993bfa20f3 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 5 Sep 2018 20:56:03 +0300 Subject: [PATCH] Declare and use _exit under MinGW32 --- include/boost/core/quick_exit.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/boost/core/quick_exit.hpp b/include/boost/core/quick_exit.hpp index 5c2e7bb..f0f903e 100644 --- a/include/boost/core/quick_exit.hpp +++ b/include/boost/core/quick_exit.hpp @@ -18,6 +18,12 @@ #include #include +#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) + +_CRTIMP __cdecl __MINGW_NOTHROW void _exit (int) __MINGW_ATTRIB_NORETURN; + +#endif + #if defined(__CYGWIN__) && __cplusplus < 201103L extern "C" _Noreturn void quick_exit(int); @@ -33,6 +39,10 @@ BOOST_NORETURN void quick_exit( int code ) BOOST_NOEXCEPT ::_exit( code ); +#elif defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) + + ::_exit( code ); + #elif defined(__APPLE__) ::_Exit( code );