Commit 30dc4736 authored by Max Kellermann's avatar Max Kellermann

system/Error: allow using errno functions on Windows

The Windows standard library emulates part of POSIX, which includes errno.
parent 65974cea
...@@ -90,7 +90,7 @@ FormatLastError(const char *fmt, Args&&... args) ...@@ -90,7 +90,7 @@ FormatLastError(const char *fmt, Args&&... args)
std::forward<Args>(args)...); std::forward<Args>(args)...);
} }
#else #endif /* WIN32 */
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
...@@ -125,8 +125,6 @@ FormatErrno(const char *fmt, Args&&... args) ...@@ -125,8 +125,6 @@ FormatErrno(const char *fmt, Args&&... args)
return FormatErrno(errno, fmt, std::forward<Args>(args)...); return FormatErrno(errno, fmt, std::forward<Args>(args)...);
} }
#endif
gcc_pure gcc_pure
static inline bool static inline bool
IsFileNotFound(const std::system_error &e) IsFileNotFound(const std::system_error &e)
......
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