From 9310a593df470eccac1068f2a70e8707655ec21d Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 17 May 2012 15:04:57 +0000 Subject: merge revision(s) 35109,35110,35651: [Backport #6385] * win32/win32.c (rb_w32_fstat, rb_w32_fstati64): convert FILETIME to time_t directly, not to be affected by TZ unnecessarily. * win32/win32.c (unixtime_to_filetime): convert time_t to FILETIME simply. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/win32.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/ruby/win32.h b/include/ruby/win32.h index 3d15742dc7..7183d682a3 100644 --- a/include/ruby/win32.h +++ b/include/ruby/win32.h @@ -149,6 +149,7 @@ extern DWORD rb_w32_osid(void); #define getppid() rb_w32_getppid() #define sleep(x) rb_w32_Sleep((x)*1000) #define Sleep(msec) (void)rb_w32_Sleep(msec) +#define fstati64(fd,st) rb_w32_fstati64(fd,st) #ifdef __BORLANDC__ #define creat(p, m) _creat(p, m) #define eof() _eof() @@ -157,7 +158,6 @@ extern DWORD rb_w32_osid(void); #define tell(h) _tell(h) #define _open _sopen #define sopen _sopen -#define _fstati64(fd,st) rb_w32_fstati64(fd,st) #undef fopen #define fopen(p, m) rb_w32_fopen(p, m) #undef fdopen @@ -184,7 +184,7 @@ extern DWORD rb_w32_osid(void); #if SIZEOF_OFF_T == 8 #define off_t __int64 #define stat stati64 -#define fstat(fd,st) _fstati64(fd,st) +#define fstat(fd,st) fstati64(fd,st) #if defined(__BORLANDC__) #define stati64(path, st) rb_w32_stati64(path, st) #elif !defined(_MSC_VER) || RT_VER < 80 @@ -195,7 +195,6 @@ extern DWORD rb_w32_osid(void); #else #define stati64 _stat64 #define _stat64(path, st) rb_w32_stati64(path, st) -#define _fstati64 _fstat64 #endif #else #define stat(path,st) rb_w32_stat(path,st) @@ -305,9 +304,9 @@ extern int rb_w32_ustati64(const char *, struct stati64 *); extern int rb_w32_access(const char *, int); extern int rb_w32_uaccess(const char *, int); extern char rb_w32_fd_is_text(int); +extern int rb_w32_fstati64(int, struct stati64 *); #ifdef __BORLANDC__ -extern int rb_w32_fstati64(int, struct stati64 *); extern off_t _lseeki64(int, off_t, int); extern FILE *rb_w32_fopen(const char *, const char *); extern FILE *rb_w32_fdopen(int, const char *); -- cgit v1.2.3