This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 1/5] time: Introduce glibc's internal struct __itimerspec64
- From: Lukasz Majewski <lukma at denx dot de>
- To: Joseph Myers <joseph at codesourcery dot com>, Paul Eggert <eggert at cs dot ucla dot edu>
- Cc: Alistair Francis <alistair23 at gmail dot com>, Alistair Francis <alistair dot francis at wdc dot com>, GNU C Library <libc-alpha at sourceware dot org>, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, Florian Weimer <fweimer at redhat dot com>, Florian Weimer <fw at deneb dot enyo dot de>, Zack Weinberg <zackw at panix dot com>, Carlos O'Donell <carlos at redhat dot com>, Lukasz Majewski <lukma at denx dot de>
- Date: Mon, 11 Nov 2019 22:47:54 +0100
- Subject: [PATCH 1/5] time: Introduce glibc's internal struct __itimerspec64
- References: <20191111214758.3677-1-lukma@denx.de>
This change provides the glibc's internal struct itimerspec representation,
which is explicitly supporting 64 bit time (by using struct __timespec64).
Such representation is necessary to provide correct time after Y2038
(time_t overflow) on devides with __TIMESIZE == 32.
---
include/time.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/include/time.h b/include/time.h
index d7800eb30f..52ee213669 100644
--- a/include/time.h
+++ b/include/time.h
@@ -82,6 +82,17 @@ struct __timespec64
};
#endif
+#if __TIMESIZE == 64
+# define __itimerspec64 itimerspec
+#else
+/* The glibc's internal representation of the struct itimerspec. */
+struct __itimerspec64
+{
+ struct __timespec64 it_interval;
+ struct __timespec64 it_value;
+};
+#endif
+
#if __TIMESIZE == 64
# define __ctime64 ctime
#else
--
2.20.1