Commit 7267fc75 authored by Alexander Alashkin's avatar Alexander Alashkin Committed by Cesanta Bot

Fix mg_stat

PUBLISHED_FROM=e6fb19c5256b6d43359f21b325e16b415152f26f
parent ea7d6906
...@@ -9142,7 +9142,7 @@ int mg_stat(const char *path, cs_stat_t *st) { ...@@ -9142,7 +9142,7 @@ int mg_stat(const char *path, cs_stat_t *st) {
wchar_t wpath[MAX_PATH_SIZE]; wchar_t wpath[MAX_PATH_SIZE];
to_wchar(path, wpath, ARRAY_SIZE(wpath)); to_wchar(path, wpath, ARRAY_SIZE(wpath));
DBG(("[%ls] -> %d", wpath, _wstati64(wpath, st))); DBG(("[%ls] -> %d", wpath, _wstati64(wpath, st)));
return _wstati64(wpath, (struct _stati64 *) st); return _wstati64(wpath, st);
#else #else
return stat(path, st); return stat(path, st);
#endif #endif
......
...@@ -248,11 +248,7 @@ typedef uint32_t in_addr_t; ...@@ -248,11 +248,7 @@ typedef uint32_t in_addr_t;
#define INT64_FMT "I64d" #define INT64_FMT "I64d"
#define INT64_X_FMT "I64x" #define INT64_X_FMT "I64x"
#define SIZE_T_FMT "Iu" #define SIZE_T_FMT "Iu"
#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
typedef struct stat cs_stat_t;
#else
typedef struct _stati64 cs_stat_t; typedef struct _stati64 cs_stat_t;
#endif
#ifndef S_ISDIR #ifndef S_ISDIR
#define S_ISDIR(x) (((x) &_S_IFMT) == _S_IFDIR) #define S_ISDIR(x) (((x) &_S_IFMT) == _S_IFDIR)
#endif #endif
......
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