summaryrefslogtreecommitdiff
path: root/boost/process/detail/windows/file_descriptor.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/process/detail/windows/file_descriptor.hpp')
-rw-r--r--boost/process/detail/windows/file_descriptor.hpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/boost/process/detail/windows/file_descriptor.hpp b/boost/process/detail/windows/file_descriptor.hpp
index 80e4c8ae8f..5058080cc4 100644
--- a/boost/process/detail/windows/file_descriptor.hpp
+++ b/boost/process/detail/windows/file_descriptor.hpp
@@ -45,11 +45,19 @@ struct file_descriptor
}
file_descriptor(const std::string & path , mode_t mode = read_write)
- : file_descriptor(path.c_str(), mode) {}
+#if defined(BOOST_NO_ANSI_APIS)
+ : file_descriptor(::boost::process::detail::convert(path), mode)
+#else
+ : file_descriptor(path.c_str(), mode)
+#endif
+ {}
file_descriptor(const std::wstring & path, mode_t mode = read_write)
: file_descriptor(path.c_str(), mode) {}
file_descriptor(const char* path, mode_t mode = read_write)
+#if defined(BOOST_NO_ANSI_APIS)
+ : file_descriptor(std::string(path), mode)
+#else
: _handle(
::boost::winapi::create_file(
path,
@@ -62,8 +70,8 @@ struct file_descriptor
::boost::winapi::FILE_ATTRIBUTE_NORMAL_,
nullptr
))
+#endif
{
-
}
file_descriptor(const wchar_t * path, mode_t mode = read_write)
: _handle(