mirror of
https://github.com/boostorg/beast.git
synced 2025-07-29 20:37:31 +02:00
@ -10,6 +10,7 @@ Version 91:
|
||||
* Set BOOST_ASIO_NO_DEPRECATED
|
||||
* Use Asio array optimization in static_buffer_base
|
||||
* Rename wstest source file
|
||||
* Use fopen_s on Windows
|
||||
|
||||
WebSocket:
|
||||
|
||||
|
@ -10,9 +10,8 @@
|
||||
#ifndef BOOST_BEAST_CONFIG_HPP
|
||||
#define BOOST_BEAST_CONFIG_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
// Available to every header
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
|
@ -96,12 +96,22 @@ open(char const* path, file_mode mode, error_code& ec)
|
||||
case file_mode::append_new: s = "abx"; break;
|
||||
case file_mode::append_existing: s = "ab"; break;
|
||||
}
|
||||
#if BOOST_MSVC
|
||||
auto const ev = fopen_s(&f_, path, s);
|
||||
if(ev)
|
||||
{
|
||||
f_ = nullptr;
|
||||
ec.assign(ev, generic_category());
|
||||
return;
|
||||
}
|
||||
#else
|
||||
f_ = std::fopen(path, s);
|
||||
if(! f_)
|
||||
{
|
||||
ec.assign(errno, generic_category());
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
ec.assign(0, ec.category());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user