Commit 78230d5f authored by Orvid King's avatar Orvid King Committed by facebook-github-bot-1

Use strerror_s on MSVC

Summary: Support for this under mingw was already present, this just uses that for MSVC as well.
Closes #273

Reviewed By: @yfeldblum

Differential Revision: D2284007

Pulled By: @sgolemon
parent 1009fdcd
...@@ -330,7 +330,7 @@ fbstring errnoStr(int err) { ...@@ -330,7 +330,7 @@ fbstring errnoStr(int err) {
// https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/strerror_r.3.html // https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/strerror_r.3.html
// http://www.kernel.org/doc/man-pages/online/pages/man3/strerror.3.html // http://www.kernel.org/doc/man-pages/online/pages/man3/strerror.3.html
#if defined(_WIN32) && defined(__MINGW32__) #if defined(_WIN32) && (defined(__MINGW32__) || defined(_MSC_VER))
// mingw64 has no strerror_r, but Windows has strerror_s, which C11 added // mingw64 has no strerror_r, but Windows has strerror_s, which C11 added
// as well. So maybe we should use this across all platforms (together // as well. So maybe we should use this across all platforms (together
// with strerrorlen_s). Note strerror_r and _s have swapped args. // with strerrorlen_s). Note strerror_r and _s have swapped args.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment