system/Error: allow using errno functions on Windows
The Windows standard library emulates part of POSIX, which includes errno.
This commit is contained in:
		@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user