File indexing completed on 2025-01-18 09:50:09
0001
0002
0003
0004
0005 #ifndef BOOST_PROCESS_V2_DETAIL_IMPL_LAST_ERROR_IPP
0006 #define BOOST_PROCESS_V2_DETAIL_IMPL_LAST_ERROR_IPP
0007
0008 #include <boost/process/v2/detail/config.hpp>
0009 #include <boost/process/v2/detail/last_error.hpp>
0010
0011 #if defined(BOOST_PROCESS_V2_WINDOWS)
0012 #include <windows.h>
0013 #else
0014 #include <cerrno>
0015 #endif
0016
0017 BOOST_PROCESS_V2_BEGIN_NAMESPACE
0018 namespace detail
0019 {
0020
0021 error_code get_last_error()
0022 {
0023 #if defined(BOOST_PROCESS_V2_WINDOWS)
0024 return error_code(::GetLastError(), system_category());
0025 #else
0026 return error_code(errno, system_category());
0027 #endif
0028
0029 }
0030
0031 }
0032 BOOST_PROCESS_V2_END_NAMESPACE
0033
0034 #endif