diff options
| author | Richard Maw <richard.maw@codethink.co.uk> | 2012-01-17 14:43:55 +0000 |
|---|---|---|
| committer | Richard Maw <richard.maw@codethink.co.uk> | 2012-01-17 14:43:55 +0000 |
| commit | 2de9abc5c9d40b3c716307d67d16146f823fd554 (patch) | |
| tree | 6979db67934ddc8b564150b465846a383b428ff8 /lib/utimens.h | |
| parent | 33cc1c6fda6e72a7bae1401e9b2cec495a4d3ff1 (diff) | |
| download | patch-baserock/bootstrap.tar.gz | |
add the output of bootstrapbaserock/bootstrap-pass2baserock/bootstrap
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 0000000..8c47cf9 --- /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 |
