From 805729e206b7586c57483aa0f4a90f7e0e2c9661 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 14 Oct 2015 22:54:08 +0000 Subject: - Remove /etc/leapsecs.dat - Publish tools to create the leap second table as a .c - Simplify functions using leap seconds - rc for 2.3.8.0 --- src/libstddjb/leapsecs_table.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/libstddjb/leapsecs_table.c (limited to 'src/libstddjb/leapsecs_table.c') diff --git a/src/libstddjb/leapsecs_table.c b/src/libstddjb/leapsecs_table.c new file mode 100644 index 0000000..d5a32a9 --- /dev/null +++ b/src/libstddjb/leapsecs_table.c @@ -0,0 +1,39 @@ +/* ISC license. */ + +/* MT-unsafe */ + +#include +#include +#include "djbtime-internal.h" + +unsigned int const leapsecs_table_len = 26 ; +static uint64 const leapsecs_table_[26] = +{ + TAI_MAGIC + 78796809, + TAI_MAGIC + 94694410, + TAI_MAGIC + 126230411, + TAI_MAGIC + 157766412, + TAI_MAGIC + 189302413, + TAI_MAGIC + 220924814, + TAI_MAGIC + 252460815, + TAI_MAGIC + 283996816, + TAI_MAGIC + 315532817, + TAI_MAGIC + 362793618, + TAI_MAGIC + 394329619, + TAI_MAGIC + 425865620, + TAI_MAGIC + 489024021, + TAI_MAGIC + 567993622, + TAI_MAGIC + 631152023, + TAI_MAGIC + 662688024, + TAI_MAGIC + 709948825, + TAI_MAGIC + 741484826, + TAI_MAGIC + 773020827, + TAI_MAGIC + 820454428, + TAI_MAGIC + 867715229, + TAI_MAGIC + 915148830, + TAI_MAGIC + 1136073631, + TAI_MAGIC + 1230768032, + TAI_MAGIC + 1341100833, + TAI_MAGIC + 1435708834 +} ; +uint64 const *const leapsecs_table = leapsecs_table_ ; -- cgit v1.2.3