summaryrefslogtreecommitdiff
path: root/src/libstddjb/djbtime-internal.h
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2014-09-18 18:55:44 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2014-09-18 18:55:44 +0000
commit3534b428629be185e096be99e3bd5fdfe32d5544 (patch)
tree210ef3198ed66bc7f7b7bf6a85e4579f455e5a36 /src/libstddjb/djbtime-internal.h
downloadskalibs-3534b428629be185e096be99e3bd5fdfe32d5544.tar.xz
initial commit with rc for skalibs-2.0.0.0
Diffstat (limited to 'src/libstddjb/djbtime-internal.h')
-rw-r--r--src/libstddjb/djbtime-internal.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/libstddjb/djbtime-internal.h b/src/libstddjb/djbtime-internal.h
new file mode 100644
index 0000000..26ffc81
--- /dev/null
+++ b/src/libstddjb/djbtime-internal.h
@@ -0,0 +1,23 @@
+/* ISC license. */
+
+#ifndef DJBTIME_INTERNAL_H
+#define DJBTIME_INTERNAL_H
+
+#include <skalibs/uint64.h>
+
+
+/* Leap second handling, for UTC <--> TAI conversions */
+
+#define LEAPSECS_MAX 39
+#define LEAPSECS_FILE SKALIBS_ETC "/leapsecs.dat"
+extern uint64 *leapsecs_here ;
+
+extern int leapsecs_init_r (char const *, uint64 *) ;
+#define leapsecs_init() leapsecs_init_r(LEAPSECS_FILE, leapsecs_here)
+extern int leapsecs_add_r (uint64 *, char const *, uint64 *, int) ;
+#define leapsecs_add(t, h) leapsecs_add_r(t, LEAPSECS_FILE, leapsecs_here, h)
+extern int leapsecs_sub_r (uint64 *, char const *, uint64 *) ;
+#define leapsecs_sub(t) leapsecs_sub_r((t), LEAPSECS_FILE, leapsecs_here)
+
+
+#endif