Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-15 10:06:41

0001 // Copyright (c) 2022 Klemens D. Morgenstern
0002 //
0003 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0004 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0005 #ifndef BOOST_PROCESS_V2_DETAIL_CONFIG_HPP
0006 #define BOOST_PROCESS_V2_DETAIL_CONFIG_HPP
0007 
0008 #if defined(BOOST_PROCESS_V2_STANDALONE)
0009 
0010 #define BOOST_PROCESS_V2_COMPLETION_TOKEN_FOR(Sig) ASIO_COMPLETION_TOKEN_FOR(Sig)
0011 
0012 #include <asio/detail/config.hpp>
0013 #include <system_error>
0014 #include <filesystem>
0015 #include <string_view>
0016 #include <iomanip>
0017 #include <optional>
0018 
0019 #if defined(ASIO_WINDOWS)
0020 #define BOOST_PROCESS_V2_WINDOWS 1
0021 
0022 #endif
0023 
0024 #if defined(ASIO_HAS_UNISTD_H)
0025 #define BOOST_PROCESS_V2_POSIX 1
0026 #endif
0027 
0028 #define BOOST_PROCESS_V2_BEGIN_NAMESPACE namespace process_v2 {
0029 #define BOOST_PROCESS_V2_END_NAMESPACE   }
0030 #define BOOST_PROCESS_V2_NAMESPACE process_v2
0031 
0032 namespace asio {}
0033 BOOST_PROCESS_V2_BEGIN_NAMESPACE
0034 namespace net = ::asio;
0035 BOOST_PROCESS_V2_END_NAMESPACE
0036 
0037 #else
0038 
0039 #define BOOST_PROCESS_V2_COMPLETION_TOKEN_FOR(Sig) BOOST_ASIO_COMPLETION_TOKEN_FOR(Sig)
0040 
0041 #include <boost/config.hpp>
0042 #include <boost/io/quoted.hpp>
0043 #include <boost/system/error_code.hpp>
0044 #include <boost/system/system_category.hpp>
0045 #include <boost/system/system_error.hpp>
0046 #include <boost/optional.hpp>
0047 
0048 #if defined(BOOST_WINDOWS_API)
0049 #define BOOST_PROCESS_V2_WINDOWS 1
0050 
0051 
0052 #endif
0053 
0054 #if defined(BOOST_POSIX_API)
0055 #define BOOST_PROCESS_V2_POSIX 1
0056 #endif
0057 
0058 #if !defined(BOOST_PROCESS_V2_WINDOWS) && !defined(BOOST_POSIX_API)
0059 #error Unsupported operating system
0060 #endif
0061 
0062 #if defined(BOOST_PROCESS_USE_STD_FS)
0063 #include <filesystem>
0064 #else
0065 #include <boost/filesystem/path.hpp>
0066 #include <boost/filesystem/operations.hpp>
0067 #endif
0068 
0069 
0070 #if !defined(BOOST_PROCESS_VERSION)
0071 #define  BOOST_PROCESS_VERSION 2
0072 #endif
0073 
0074 
0075 #if BOOST_PROCESS_VERSION == 1
0076 #define BOOST_PROCESS_V2_BEGIN_NAMESPACE namespace boost { namespace process { namespace v2 {
0077 #else
0078 #define BOOST_PROCESS_V2_BEGIN_NAMESPACE namespace boost { namespace process { inline namespace v2 {
0079 #endif
0080 
0081 #define BOOST_PROCESS_V2_END_NAMESPACE  } } }
0082 #define BOOST_PROCESS_V2_NAMESPACE boost::process::v2
0083 
0084 namespace boost { namespace asio {} }
0085 BOOST_PROCESS_V2_BEGIN_NAMESPACE
0086 namespace net = ::boost::asio;
0087 BOOST_PROCESS_V2_END_NAMESPACE
0088 
0089 #endif
0090 
0091 BOOST_PROCESS_V2_BEGIN_NAMESPACE
0092 
0093 #if defined(BOOST_PROCESS_STANDALONE)
0094 
0095 using std::error_code ;
0096 using std::error_category ;
0097 using std::system_category ;
0098 using std::system_error ;
0099 namespace filesystem = std::filesystem;
0100 using std::quoted;
0101 using std::optional;
0102 
0103 #define BOOST_PROCESS_V2_ASSIGN_EC(ec, ...) ec.assign(__VA_ARGS__);
0104 #define BOOST_PROCESS_V2_ASSIGN_LAST_ERROR(ec)                         \
0105   ec.assign(::BOOST_PROCESS_V2_NAMESPACE::detail::get_last_error());   \
0106 
0107 
0108 #else
0109 
0110 using boost::system::error_code ;
0111 using boost::system::error_category ;
0112 using boost::system::system_category ;
0113 using boost::system::system_error ;
0114 using boost::io::quoted;
0115 using boost::optional;
0116 
0117 #ifdef BOOST_PROCESS_USE_STD_FS
0118 namespace filesystem = std::filesystem;
0119 #else
0120 namespace filesystem = boost::filesystem;
0121 #endif
0122 
0123 #define BOOST_PROCESS_V2_ASSIGN_EC(ec, ...)                       \
0124 do                                                                \
0125 {                                                                 \
0126   static constexpr auto loc##__LINE__((BOOST_CURRENT_LOCATION));  \
0127   ec.assign(__VA_ARGS__,  &loc##__LINE__);                        \
0128 }                                                                 \
0129 while (false)
0130 
0131 #define BOOST_PROCESS_V2_ASSIGN_LAST_ERROR(ec)                                         \
0132 do                                                                                     \
0133 {                                                                                      \
0134   static constexpr auto loc##__LINE__((BOOST_CURRENT_LOCATION));                       \
0135   ec.assign(::BOOST_PROCESS_V2_NAMESPACE::detail::get_last_error(), &loc##__LINE__);   \
0136 }                                                                                      \
0137 while (false)
0138 
0139 
0140 #endif
0141 
0142 BOOST_PROCESS_V2_END_NAMESPACE
0143 
0144 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_PROCESS_DYN_LINK)
0145 #if defined(BOOST_PROCESS_SOURCE)
0146 #define BOOST_PROCESS_V2_DECL BOOST_SYMBOL_EXPORT
0147 #else
0148 #define BOOST_PROCESS_V2_DECL BOOST_SYMBOL_IMPORT
0149 #endif
0150 #else
0151 #define BOOST_PROCESS_V2_DECL
0152 #endif
0153 
0154 #if !defined(BOOST_PROCESS_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_PROCESS_NO_LIB)
0155 #define BOOST_LIB_NAME boost_process
0156 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_PROCESS_DYN_LINK)
0157 #define BOOST_DYN_LINK
0158 #endif
0159 #include <boost/config/auto_link.hpp>
0160 #endif 
0161 
0162 #if defined(BOOST_PROCESS_V2_POSIX)
0163 
0164 #if defined(__linux__) && !defined(BOOST_PROCESS_V2_DISABLE_PIDFD_OPEN)
0165 
0166 #include <sys/syscall.h>
0167 
0168 #if defined(SYS_pidfd_open)
0169 #define BOOST_PROCESS_V2_PIDFD_OPEN 1
0170 #define BOOST_PROCESS_V2_HAS_PROCESS_HANDLE 1
0171 #endif
0172 #endif
0173 
0174 #if defined(__FreeBSD__) && defined(BOOST_PROCESS_V2_ENABLE_PDFORK)
0175 #define BOOST_PROCESS_V2_PDFORK 1
0176 #define BOOST_PROCESS_V2_HAS_PROCESS_HANDLE 1
0177 #endif
0178 #else
0179 #define BOOST_PROCESS_V2_HAS_PROCESS_HANDLE 1
0180 #endif
0181 
0182 #endif //BOOST_PROCESS_V2_DETAIL_CONFIG_HPP