diff options
Diffstat (limited to 'boost/process/detail/config.hpp')
-rw-r--r-- | boost/process/detail/config.hpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/boost/process/detail/config.hpp b/boost/process/detail/config.hpp index 2e280c1d53..e668811cd5 100644 --- a/boost/process/detail/config.hpp +++ b/boost/process/detail/config.hpp @@ -31,7 +31,7 @@ extern char **environ; #endif #elif defined(BOOST_WINDOWS_API) -#include <boost/detail/winapi/get_last_error.hpp> +#include <boost/winapi/get_last_error.hpp> #else #error "System API not supported by boost.process" #endif @@ -53,7 +53,7 @@ inline std::error_code get_last_error() noexcept } //copied from linux spec. -#if defined (__USE_XOPEN_EXTENDED) && !defined (__USE_XOPEN2K8) || defined( __USE_BSD) +#if (_XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) && !(_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700) #define BOOST_POSIX_HAS_VFORK 1 #endif @@ -63,7 +63,7 @@ namespace api = windows; inline std::error_code get_last_error() noexcept { - return std::error_code(::boost::detail::winapi::GetLastError(), std::system_category()); + return std::error_code(::boost::winapi::GetLastError(), std::system_category()); } #endif @@ -72,6 +72,11 @@ inline void throw_last_error(const std::string & msg) throw process_error(get_last_error(), msg); } +inline void throw_last_error(const char * msg) +{ + throw process_error(get_last_error(), msg); +} + inline void throw_last_error() { throw process_error(get_last_error()); |