system/Error: allow using errno functions on Windows

The Windows standard library emulates part of POSIX, which includes
errno.
This commit is contained in:
Max Kellermann 2016-12-04 19:49:23 +01:00
parent 65974ceabc
commit 30dc473697
1 changed files with 1 additions and 3 deletions

View File

@ -90,7 +90,7 @@ FormatLastError(const char *fmt, Args&&... args)
std::forward<Args>(args)...);
}
#else
#endif /* WIN32 */
#include <errno.h>
#include <string.h>
@ -125,8 +125,6 @@ FormatErrno(const char *fmt, Args&&... args)
return FormatErrno(errno, fmt, std::forward<Args>(args)...);
}
#endif
gcc_pure
static inline bool
IsFileNotFound(const std::system_error &e)