mirror of
https://github.com/facebook/zstd.git
synced 2025-07-29 11:21:22 +03:00
use strerror() to generate error message
as suggested by @terrelln . also: - hopefully fixed Windows version - changed the test, so that it passes on non-english OS stdlib errors.
This commit is contained in:
@ -24,8 +24,12 @@ extern "C" {
|
||||
int UTIL_fileExist(const char* filename)
|
||||
{
|
||||
stat_t statbuf;
|
||||
int const stat_success = stat(filename, &statbuf);
|
||||
return !stat_success;
|
||||
#if defined(_MSC_VER)
|
||||
int const stat_error = _stat64(filename, &statbuf);
|
||||
#else
|
||||
int const stat_error = stat(filename, &statbuf);
|
||||
#endif
|
||||
return !stat_error;
|
||||
}
|
||||
|
||||
int UTIL_isRegularFile(const char* infilename)
|
||||
|
Reference in New Issue
Block a user