diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-03-19 13:44:20 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-03-29 10:22:13 -0300 |
commit | 6fbc0540de8ecf8ecdf36925769797a0e9dfea4b (patch) | |
tree | 42ca6102299e35b3c5b7e1fea92b1fc5d2773981 /support/support.h | |
parent | 5b980d4809913088729982865188b754939bcd39 (diff) | |
download | glibc-6fbc0540de8ecf8ecdf36925769797a0e9dfea4b.tar.gz glibc-6fbc0540de8ecf8ecdf36925769797a0e9dfea4b.tar.xz glibc-6fbc0540de8ecf8ecdf36925769797a0e9dfea4b.zip |
support: Add support_path_support_time64_value
It allows to check for support on arbitrary timestamp values.
Diffstat (limited to 'support/support.h')
-rw-r--r-- | support/support.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/support/support.h b/support/support.h index 90f3ff9d1a..b0352726bf 100644 --- a/support/support.h +++ b/support/support.h @@ -130,9 +130,16 @@ extern void support_copy_file (const char *from, const char *to); extern ssize_t support_copy_file_range (int, off64_t *, int, off64_t *, size_t, unsigned int); -/* Return true is PATH supports 64-bit time_t interfaces for file +/* Return true if PATH supports 64-bit time_t interfaces for file operations (such as fstatat or utimensat). */ -extern bool support_path_support_time64 (const char *path); +extern bool support_path_support_time64_value (const char *path, int64_t at, + int64_t mt); +static __inline bool support_path_support_time64 (const char *path) +{ + /* 1s and 2s after y2038 limit. */ + return support_path_support_time64_value (path, 0x80000001ULL, + 0x80000002ULL); +} /* Return true if stat supports nanoseconds resolution. */ extern bool support_stat_nanoseconds (void); |