about summary refs log tree commit diff
path: root/include/time.h
diff options
context:
space:
mode:
authorLukasz Majewski <lukma@denx.de>2020-02-06 14:25:30 +0100
committerLukasz Majewski <lukma@denx.de>2020-03-03 14:28:08 +0100
commit847d3913dae1ba9be76d512e849da21b42400228 (patch)
tree7acfb3dd2c59a27f49d325e14e427e4099902228 /include/time.h
parent24caa35c571fe9590d7cf33dc81d8d94cac7de7f (diff)
downloadglibc-847d3913dae1ba9be76d512e849da21b42400228.tar.gz
glibc-847d3913dae1ba9be76d512e849da21b42400228.tar.xz
glibc-847d3913dae1ba9be76d512e849da21b42400228.zip
y2038: Introduce struct __utimbuf64 - new internal glibc type
This type is a glibc's "internal" type to store file's access and modification
times in __time64_t rather than __time_t, which makes it Y2038-proof.

Build tests:
./src/scripts/build-many-glibcs.py glibcs

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'include/time.h')
-rw-r--r--include/time.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/time.h b/include/time.h
index 61806658e7..0bb2bccf78 100644
--- a/include/time.h
+++ b/include/time.h
@@ -109,6 +109,18 @@ struct __timeval64
 #endif
 
 #if __TIMESIZE == 64
+# define __utimbuf64 utimbuf
+#else
+/* The glibc Y2038-proof struct __utimbuf64 structure for file's access
+   and modification time values.  */
+struct __utimbuf64
+{
+  __time64_t actime;		/* Access time.  */
+  __time64_t modtime;		/* Modification time.  */
+};
+#endif
+
+#if __TIMESIZE == 64
 # define __ctime64 ctime
 #else
 extern char *__ctime64 (const __time64_t *__timer) __THROW;