Go to the documentation of this file.
18 #include <boost/config.hpp>
19 #include <boost/system/config.hpp>
20 #include <boost/system/error_code.hpp>
21 #include <boost/system/system_error.hpp>
23 #if defined(BOOST_POSIX_API)
25 # define BOOST_PROCESS_LAST_ERROR errno
26 # define BOOST_PROCESS_PLATFORM posix
27 #elif defined(BOOST_WINDOWS_API)
29 # define BOOST_PROCESS_LAST_ERROR GetLastError()
30 # define BOOST_PROCESS_PLATFORM windows
34 #define BOOST_PROCESS_PLATFORM_PROMOTE_PATH(COMPONENT) \
35 <boost/process/BOOST_PROCESS_PLATFORM/COMPONENT.hpp>
36 #define BOOST_PROCESS_PLATFORM_PROMOTE_NAMESPACE(COMPONENT) \
37 namespace boost::process { using BOOST_PROCESS_PLATFORM::COMPONENT; }
38 #define BOOST_PROCESS_PLATFORM_PROMOTE_INITIALIZERS_NAMESPACE \
39 namespace boost::process::initializers { \
40 using namespace boost::process::BOOST_PROCESS_PLATFORM::initializers; }
43 #if defined(BOOST_PROCESS_DOXYGEN)
49 #define BOOST_POSIX_API
55 #define BOOST_WINDOWS_API
64 #define BOOST_PROCESS_THROW(EX) throw EX
67 #define BOOST_PROCESS_SOURCE_LOCATION \
68 "in file '" __FILE__ "', line " BOOST_STRINGIZE(__LINE__) ": "
70 #define BOOST_PROCESS_THROW_LAST_SYSTEM_ERROR(what) \
71 BOOST_PROCESS_THROW(boost::system::system_error( \
72 boost::system::error_code(BOOST_PROCESS_LAST_ERROR, \
73 boost::system::system_category()), \
74 BOOST_PROCESS_SOURCE_LOCATION what))
76 #define BOOST_PROCESS_RETURN_LAST_SYSTEM_ERROR(ec) \
77 ec = boost::system::error_code(BOOST_PROCESS_LAST_ERROR, \
78 boost::system::system_category())