From c6878ac123f343a2fd7d286108ff897918678c6a Mon Sep 17 00:00:00 2001 From: root Date: Thu, 14 Jul 2011 19:19:22 +0000 Subject: *** empty log message *** --- eio.c | 6 ++++-- eio.h | 7 ++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/eio.c b/eio.c index 121a3bb..d67a2b3 100644 --- a/eio.c +++ b/eio.c @@ -100,9 +100,11 @@ static void eio_destroy (eio_req *req); #define PAGESIZE 4096 /* GetSystemInfo? */ - #define stat(path,buf) _stati64 (path,buf) + #ifdef EIO_STRUCT_STATI64 + #define stat(path,buf) _stati64 (path,buf) + #define fstat(fd,buf) _fstati64 (path,buf) + #endif #define lstat(path,buf) stat (path,buf) - #define fstat(fd,buf) _fstati64 (path,buf) #define fsync(fd) (FlushFileBuffers (EIO_FD_TO_WIN32_HANDLE (fd)) ? 0 : EIO_ERRNO (EBADF, -1)) #define mkdir(path,mode) _mkdir (path) #define link(old,neu) (CreateHardLink (neu, old, 0) ? 0 : EIO_ERRNO (ENOENT, -1)) diff --git a/eio.h b/eio.h index 9be7327..e99f0d6 100644 --- a/eio.h +++ b/eio.h @@ -58,7 +58,12 @@ typedef int (*eio_cb)(eio_req *req); #endif #ifndef EIO_STRUCT_STAT -# define EIO_STRUCT_STAT struct stat +# ifdef _WIN32 +# define EIO_STRUCT_STAT struct _stati64 +# define EIO_STRUCT_STATI64 +# else +# define EIO_STRUCT_STAT struct stat +# endif #endif #ifndef EIO_STRUCT_STATVFS -- cgit v1.2.3