NEWS.stable: log cherry-pick [3180807]->[768eb31] doc/lgpl-2.1.texi
[gnulib.git] / lib / utimens.h
index 8b3ccef..8c47cf9 100644 (file)
@@ -1,4 +1,19 @@
 #include <time.h>
-int gl_futimens (int, char const *, struct timespec const [2]);
+int fdutimens (int, char const *, struct timespec const [2]);
 int utimens (char const *, struct timespec const [2]);
 int lutimens (char const *, struct timespec const [2]);
+
+#if GNULIB_FDUTIMENSAT
+# include <fcntl.h>
+# include <sys/stat.h>
+
+int fdutimensat (int fd, int dir, char const *name, struct timespec const [2],
+                 int atflag);
+
+/* Using this function makes application code slightly more readable.  */
+static inline int
+lutimensat (int dir, char const *file, struct timespec const times[2])
+{
+  return utimensat (dir, file, times, AT_SYMLINK_NOFOLLOW);
+}
+#endif