diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-06-22 14:26:37 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-06-22 14:26:37 -0700 |
commit | c8fff8630133fea7c4e279458d10d825e5028c62 (patch) | |
tree | f8b8261fdf3596e1306a3d072e13ec572c9e3e65 /lib/utimens.h | |
parent | 36cec983d4e680e28e7066fda505910cd549f509 (diff) | |
download | emacs-c8fff8630133fea7c4e279458d10d825e5028c62.tar.gz |
Add gnulib files to support higher-resolution time stamps.
Fixes: debbugs:9000
Diffstat (limited to 'lib/utimens.h')
-rw-r--r-- | lib/utimens.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/utimens.h b/lib/utimens.h new file mode 100644 index 00000000000..8c47cf93f88 --- /dev/null +++ b/lib/utimens.h @@ -0,0 +1,19 @@ +#include <time.h> +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 |