[PATCH 05/20] lib/cobalt: Introduce wrappers_time64.c

Florian Bezdeka <[email protected]>
Newsgroups dev.linux.lists.xenomai
Message-ID <20260220-wip-flo-fix-time64-32bit-native-v1-5-731c773e72cc@siemens.com>
All COBALT_IMPL_TIME64() services will be moved afterwards - step by
step - into the newly introduced wrappers_time64.c. At the end that
should allow us to compile libcobalt with time64_t support leaving
the native time_t services in place.

Currently, all native time_t services are replaced by the 64 bit
variants. That is OK as long as applications are rebuild after
libcobalt, but we try to remove this limitation now.

Signed-off-by: Florian Bezdeka <[email protected]>
---
 lib/cobalt/Makefile.am       | 3 ++-
 lib/cobalt/wrappers_time64.c | 6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/cobalt/Makefile.am b/lib/cobalt/Makefile.am
index f461e570ed42a0d5cbc43eabb373c3c9edd83bad..17e203f9015fe2bb5306609e4d51c62f3a725780 100644
--- a/lib/cobalt/Makefile.am
+++ b/lib/cobalt/Makefile.am
@@ -43,7 +43,8 @@ libcobalt_la_SOURCES =		\
 	timerfd.c		\
 	trace.c			\
 	umm.c			\
-	wrappers.c
+	wrappers.c		\
+	wrappers_time64.c
 
 libcobalt_la_CPPFLAGS =			\
 	@XENO_COBALT_CFLAGS@		\
diff --git a/lib/cobalt/wrappers_time64.c b/lib/cobalt/wrappers_time64.c
new file mode 100644
index 0000000000000000000000000000000000000000..4c4e0db0650b49f46cbd6d9ecf7cd656bb04bbe4
--- /dev/null
+++ b/lib/cobalt/wrappers_time64.c
@@ -0,0 +1,6 @@
+/*
+ * Magic ahead:
+ * This file is compiled twice in case y2038/time64_t support is necessary
+ * and requested. The first time with time64_t and a second time with native
+ * time_t.
+ */

-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.