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 @@ ...@@ -43,9 +43,21 @@
#ifdef UNDER_CE #ifdef UNDER_CE
# include <tchar.h> # include <tchar.h>
#endif #endif
#ifdef HAVE_SYS_STAT_H #ifdef HAVE_SYS_STAT_H
# include <sys/stat.h> # include <sys/stat.h>
#endif #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 #ifndef HAVE_LSTAT
# define lstat( a, b ) stat(a, b) # define lstat( a, b ) stat(a, b)
#endif #endif
...@@ -510,7 +522,7 @@ static int utf8_statEx( const char *filename, void *buf, ...@@ -510,7 +522,7 @@ static int utf8_statEx( const char *filename, void *buf,
wpath[MAX_PATH] = L'\0'; wpath[MAX_PATH] = L'\0';
/* struct _stat is just a silly Microsoft alias for struct stat */ /* struct _stat is just a silly Microsoft alias for struct stat */
return _wstat( wpath, (struct _stat *)buf ); return _wstati64( wpath, (struct _stati64 *)buf );
#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