summaryrefslogtreecommitdiff
path: root/deps/libeio
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2010-11-26 01:24:04 +0100
committerBert Belder <bertbelder@gmail.com>2010-12-20 23:51:15 +0100
commit967b7b0d8cd48a6ec87ff9512987f845a5b4ed52 (patch)
treea18e6bf0329b52c9f2ab3ddad571ff42a8de04fe /deps/libeio
parentf48c36f74f98c606d2770259a4c950f8f9fd3329 (diff)
downloadnode-new-967b7b0d8cd48a6ec87ff9512987f845a5b4ed52.tar.gz
Libeio should use correct stat/fstat as well
Diffstat (limited to 'deps/libeio')
-rw-r--r--deps/libeio/eio.c8
-rw-r--r--deps/libeio/eio.h6
2 files changed, 13 insertions, 1 deletions
diff --git a/deps/libeio/eio.c b/deps/libeio/eio.c
index 27f94ad047..d12f5bd999 100644
--- a/deps/libeio/eio.c
+++ b/deps/libeio/eio.c
@@ -885,6 +885,14 @@ static int eio__futimes (int fd, const struct timeval tv[2])
# define fdatasync(fd) fsync (fd)
#endif
+// Use unicode and big file aware stat on windows
+#ifdef _WIN32
+# undef stat
+# undef fstat
+# define stat _stati64
+# define fstat _fstati64
+#endif
+
/* sync_file_range always needs emulation */
int
eio__sync_file_range (int fd, off_t offset, size_t nbytes, unsigned int flags)
diff --git a/deps/libeio/eio.h b/deps/libeio/eio.h
index 5e2bdfe63d..785e5b0561 100644
--- a/deps/libeio/eio.h
+++ b/deps/libeio/eio.h
@@ -66,7 +66,11 @@ 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
+# else
+# define EIO_STRUCT_STAT struct stat
+# endif
#endif
#ifndef EIO_STRUCT_STATVFS