Commit 117e041c authored by Antoine Cellerier's avatar Antoine Cellerier

Fix stat wrapper on windows... Wrappers are nice. Wrappers which work are better.

parent 663b6a30
......@@ -43,9 +43,21 @@
#ifdef UNDER_CE
# include <tchar.h>
#endif
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#if defined( WIN32 ) && !defined( UNDER_CE )
/* stat() support for large files on win32 */
# define stat _stati64
# define fstat(a,b) _fstati64(a,b)
# ifdef lseek
# undef lseek
# endif
# define lseek _lseeki64
#endif
#ifndef HAVE_LSTAT
# define lstat( a, b ) stat(a, b)
#endif
......@@ -510,7 +522,7 @@ static int utf8_statEx( const char *filename, void *buf,
wpath[MAX_PATH] = L'\0';
/* struct _stat is just a silly Microsoft alias for struct stat */
return _wstat( wpath, (struct _stat *)buf );
return _wstati64( wpath, (struct _stati64 *)buf );
#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