mirror of
https://github.com/lifegpc/c-utils.git
synced 2026-07-08 01:30:39 +08:00
Add workround to _wstat64 is not works on MingW GCC
This commit is contained in:
@@ -59,8 +59,13 @@ int open_internal(wchar_t* fn, int* fd, int oflag, int shflag, int pmode) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool isdir_internal(wchar_t* fn, bool& result) {
|
bool isdir_internal(wchar_t* fn, bool& result) {
|
||||||
|
#if __MINGW32__
|
||||||
|
struct _stat stats;
|
||||||
|
if (_wstat(fn, &stats)) {
|
||||||
|
#else
|
||||||
struct __stat64 stats;
|
struct __stat64 stats;
|
||||||
if (_wstat64(fn, &stats)) {
|
if (_wstat64(fn, &stats)) {
|
||||||
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
result = stats.st_mode & S_IFDIR;
|
result = stats.st_mode & S_IFDIR;
|
||||||
|
|||||||
Reference in New Issue
Block a user