Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:50:10

0001 //
0002 // boost/process/v2/impl/environment.hpp
0003 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0004 //
0005 // Copyright (c) 2022 Klemens D. Morgenstern (klemens dot morgenstern at gmx dot net)
0006 //
0007 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0008 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0009 //
0010 
0011 #ifndef BOOST_PROCESS_V2_IMPL_ENVIRONMENT_IPP
0012 #define BOOST_PROCESS_V2_IMPL_ENVIRONMENT_IPP
0013 
0014 #include <boost/process/v2/detail/config.hpp>
0015 #include <boost/process/v2/default_launcher.hpp>
0016 #include <boost/process/v2/environment.hpp>
0017 
0018 BOOST_PROCESS_V2_BEGIN_NAMESPACE
0019 
0020 #if defined(BOOST_PROCESS_V2_WINDOWS)
0021 
0022 error_code process_environment::on_setup(windows::default_launcher & launcher, const filesystem::path &, const std::wstring &)
0023 {
0024     if (!unicode_env.empty() && !ec)
0025     {
0026       launcher.creation_flags |= CREATE_UNICODE_ENVIRONMENT ;
0027       launcher.environment = unicode_env.data();
0028     }
0029 
0030     return ec;
0031 };
0032 
0033 #else
0034 
0035 error_code process_environment::on_setup(posix::default_launcher & launcher, const filesystem::path &, const char * const *)
0036 {
0037     launcher.env = env.data();
0038     return error_code{};
0039 };
0040 
0041 #endif
0042 
0043 
0044 BOOST_PROCESS_V2_END_NAMESPACE
0045 
0046 
0047 #endif //BOOST_PROCESS_V2_IMPL_ENVIRONMENT_IPP