From 1c032ec5855551c44b88f94fc35fa87db4279f0a Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 9 Jan 2015 01:00:59 +0000 Subject: tai conversion functions overhaul. API change -> rc for 2.2.0.0 Doc updated. --- src/libstddjb/time_from_tai_relative.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/libstddjb/time_from_tai_relative.c (limited to 'src/libstddjb/time_from_tai_relative.c') diff --git a/src/libstddjb/time_from_tai_relative.c b/src/libstddjb/time_from_tai_relative.c new file mode 100644 index 0000000..f5233fe --- /dev/null +++ b/src/libstddjb/time_from_tai_relative.c @@ -0,0 +1,16 @@ + /* ISC license. */ + +#include +#include +#include +#include + +int time_from_tai_relative (time_t *u, tai_t const *t) +{ +#if SKALIBS_SIZEOFTIME < 8 + if ((t->x >> 32) && (t->x >> 32) != 0xffffffffUL) + return (errno = EOVERFLOW, 0) ; +#endif + *u = (time_t)t->x ; + return 1 ; +} -- cgit v1.2.3