Declare and use _exit under MinGW32

This commit is contained in:
Peter Dimov
2018-09-05 20:56:03 +03:00
parent 0c605bf32f
commit 88acbce1e9

View File

@ -18,6 +18,12 @@
#include <boost/config.hpp>
#include <cstdlib>
#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 );