X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Futimens.h;h=bb0326da5fc23b00cffba7081410f09f4df960f3;hb=969fe755730d23ba7ff21ae7511f66067d0a94d8;hp=a02c6a465d8df3b5d792545fe9a9ab15aa9e021e;hpb=aba351689b1b5ce068b76d112c1f4929ac26ab9c;p=gnulib.git diff --git a/lib/utimens.h b/lib/utimens.h index a02c6a465..bb0326da5 100644 --- a/lib/utimens.h +++ b/lib/utimens.h @@ -3,3 +3,17 @@ int fdutimens (char const *, int, struct timespec const [2]); int gl_futimens (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 +# include + +int fdutimensat (int dir, char const *name, int fd, struct timespec const [2]); + +/* Using this function makes application code slightly more readable. */ +static inline int +lutimensat (int fd, char const *file, struct timespec const times[2]) +{ + return utimensat (fd, file, times, AT_SYMLINK_NOFOLLOW); +} +#endif