From ce7c1c05779575ecd031a4852baeb232eba4eb4d Mon Sep 17 00:00:00 2001 From: usa Date: Mon, 4 Dec 2017 10:48:30 +0000 Subject: support nanosec file timestamp on newer Windows Support nanosec file timestamp on Windows 8 or later. Original patches are written by kubo (Kubo Takehiro). Windows 7 and earlier also supports nanosec file timestamp, but it's too accurate than system time. so, this feature is disabled on such versions. [Feature #13726] this change also includes [Misc #13702] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- file.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'file.c') diff --git a/file.c b/file.c index de46d56aca..07e0432ca8 100644 --- a/file.c +++ b/file.c @@ -91,9 +91,9 @@ int flock(int, int); /* define system APIs */ #ifdef _WIN32 #include "win32/file.h" -#define STAT(p, s) rb_w32_ustati64((p), (s)) +#define STAT(p, s) rb_w32_ustati64ns((p), (s)) #undef lstat -#define lstat(p, s) rb_w32_ulstati64((p), (s)) +#define lstat(p, s) rb_w32_ulstati64ns((p), (s)) #undef access #define access(p, m) rb_w32_uaccess((p), (m)) #undef truncate @@ -104,8 +104,8 @@ int flock(int, int); #define chown(p, o, g) rb_w32_uchown((p), (o), (g)) #undef lchown #define lchown(p, o, g) rb_w32_ulchown((p), (o), (g)) -#undef utime -#define utime(p, t) rb_w32_uutime((p), (t)) +#undef utimensat +#define utimensat(s, p, t, f) rb_w32_uutimensat((s), (p), (t), (f)) #undef link #define link(f, t) rb_w32_ulink((f), (t)) #undef unlink -- cgit v1.2.3