summaryrefslogtreecommitdiff
path: root/lib/utime.in.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2017-05-07 21:50:30 +0200
committerBruno Haible <bruno@clisp.org>2017-05-08 11:59:00 +0200
commit26d566787603c3469760670613f34aab760ec6f3 (patch)
tree40cf489becb86f7f854856ea8af8c0b103d9c9a0 /lib/utime.in.h
parentdf46bfb995b3cbd33ecfe5be088b83dbf9064f51 (diff)
downloadgnulib-26d566787603c3469760670613f34aab760ec6f3.tar.gz
utimens: On native Windows, support 100ns resolution also if fd < 0.
* lib/utime.in.h: Include <time.h>. (_gl_utimens_windows): New declaration. * lib/utime.c (_gl_utimens_windows): New function, based on utime. (utime): Invoke it. * lib/utimens.c (fdutimens): On native Windows, call _gl_utimens_windows instead of utime. * modules/utime (Depends-on): Add 'time'.
Diffstat (limited to 'lib/utime.in.h')
-rw-r--r--lib/utime.in.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/utime.in.h b/lib/utime.in.h
index 8847e7272e..df80d8c061 100644
--- a/lib/utime.in.h
+++ b/lib/utime.in.h
@@ -33,6 +33,11 @@
# include <sys/utime.h>
#endif
+#if @GNULIB_UTIME@
+/* Get struct timespec. */
+# include <time.h>
+#endif
+
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
@@ -74,6 +79,10 @@ _GL_WARN_ON_USE (utime,
# endif
#endif
+#if @GNULIB_UTIME@
+extern int _gl_utimens_windows (const char *filename, struct timespec ts[2]);
+#endif
+
#endif /* _@GUARD_PREFIX@_UTIME_H */
#endif /* _@GUARD_PREFIX@_UTIME_H */