From 6c2d805a041b9d77a9513ef88591181ebb44bad2 Mon Sep 17 00:00:00 2001 From: Sebastian Freundt Date: Wed, 11 Aug 2021 12:00:08 +0000 Subject: [PATCH] hack, also commit generated leap-seconds.def to avoid LTRCC calls --- lib/leap-seconds.def | 222 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 222 insertions(+) create mode 100644 lib/leap-seconds.def diff --git a/lib/leap-seconds.def b/lib/leap-seconds.def new file mode 100644 index 00000000..c64399ad --- /dev/null +++ b/lib/leap-seconds.def @@ -0,0 +1,222 @@ +/*** autogenerated by: ltrcc ../../lib/leap-seconds.list */ + +#include +#include +#include "leaps.h" +#include "leap-seconds.h" + +#if !defined INCLUDED_ltrcc_generated_def_ +#define INCLUDED_ltrcc_generated_def_ + +#if !defined countof +# define countof(x) (sizeof(x) / sizeof(*x)) +#endif /* !countof */ + +const int32_t leaps_corr[] = { + 10, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 37 +}; +const size_t nleaps_corr = countof(leaps_corr); + +const uint32_t leaps_ymd[] = { + 0x00U/* 0 */, + 0x1ecf1fU/* 2019103 */, + 0x1ed19eU/* 2019742 */, + 0x1ed31fU/* 2020127 */, + 0x1ed71fU/* 2021151 */, + 0x1edb1fU/* 2022175 */, + 0x1edf1fU/* 2023199 */, + 0x1ee31fU/* 2024223 */, + 0x1ee71fU/* 2025247 */, + 0x1eeb1fU/* 2026271 */, + 0x1eef1fU/* 2027295 */, + 0x1ef59eU/* 2028958 */, + 0x1ef99eU/* 2029982 */, + 0x1efd9eU/* 2031006 */, + 0x1f059eU/* 2033054 */, + 0x1f0f1fU/* 2035487 */, + 0x1f171fU/* 2037535 */, + 0x1f1b1fU/* 2038559 */, + 0x1f219eU/* 2040222 */, + 0x1f259eU/* 2041246 */, + 0x1f299eU/* 2042270 */, + 0x1f2f1fU/* 2043679 */, + 0x1f359eU/* 2045342 */, + 0x1f3b1fU/* 2046751 */, + 0x1f571fU/* 2053919 */, + 0x1f631fU/* 2056991 */, + 0x1f719eU/* 2060702 */, + 0x1f7d9eU/* 2063774 */, + 0x1f831fU/* 2065183 */, + UINT32_MAX +}; +const size_t nleaps_ymd = countof(leaps_ymd); + +const uint32_t leaps_ymcw[] = { + 0x00U/* 0 */, + 0x191ecf2dU/* 421449517 */, + 0x191ed1adU/* 421450157 */, + 0x191ed32fU/* 421450543 */, + 0x191ed729U/* 421451561 */, + 0x191edb2aU/* 421452586 */, + 0x191edf2bU/* 421453611 */, + 0x191ee32dU/* 421454637 */, + 0x191ee72eU/* 421455662 */, + 0x191eeb2fU/* 421456687 */, + 0x191eef29U/* 421457705 */, + 0x191ef5aaU/* 421459370 */, + 0x191ef9abU/* 421460395 */, + 0x191efdacU/* 421461420 */, + 0x191f05afU/* 421463471 */, + 0x191f0f2cU/* 421465900 */, + 0x191f172fU/* 421467951 */, + 0x191f1b29U/* 421468969 */, + 0x191f21aaU/* 421470634 */, + 0x191f25abU/* 421471659 */, + 0x191f29acU/* 421472684 */, + 0x191f2f2fU/* 421474095 */, + 0x191f35a9U/* 421475753 */, + 0x191f3b2cU/* 421477164 */, + 0x191f572eU/* 421484334 */, + 0x191f632bU/* 421487403 */, + 0x191f71aeU/* 421491118 */, + 0x191f7daaU/* 421494186 */, + 0x191f832eU/* 421495598 */, + UINT32_MAX +}; +const size_t nleaps_ymcw = countof(leaps_ymcw); + +const uint32_t leaps_d[] = { + 0x00U/* 0 */, + 0x21150U/* 135504 */, + 0x21206U/* 135686 */, + 0x212beU/* 135870 */, + 0x2142bU/* 136235 */, + 0x21598U/* 136600 */, + 0x21705U/* 136965 */, + 0x21873U/* 137331 */, + 0x219e0U/* 137696 */, + 0x21b4dU/* 138061 */, + 0x21cbaU/* 138426 */, + 0x21eddU/* 138973 */, + 0x2204aU/* 139338 */, + 0x221b7U/* 139703 */, + 0x22492U/* 140434 */, + 0x22824U/* 141348 */, + 0x22affU/* 142079 */, + 0x22c6cU/* 142444 */, + 0x22e8fU/* 142991 */, + 0x22ffcU/* 143356 */, + 0x23169U/* 143721 */, + 0x2338eU/* 144270 */, + 0x235b1U/* 144817 */, + 0x237d6U/* 145366 */, + 0x241d3U/* 147923 */, + 0x2461bU/* 149019 */, + 0x24b18U/* 150296 */, + 0x24f5fU/* 151391 */, + 0x25185U/* 151941 */, + UINT32_MAX +}; +const size_t nleaps_d = countof(leaps_d); + +const int32_t leaps_s[] = { + INT32_MIN, + 0x3c266ffU/* 63071999 */, + 0x4b257ffU/* 78796799 */, + 0x5a4ebffU/* 94694399 */, + 0x7861f7fU/* 126230399 */, + 0x96752ffU/* 157766399 */, + 0xb48867fU/* 189302399 */, + 0xd2b0b7fU/* 220924799 */, + 0xf0c3effU/* 252460799 */, + 0x10ed727fU/* 283996799 */, + 0x12cea5ffU/* 315532799 */, + 0x159fca7fU/* 362793599 */, + 0x1780fdffU/* 394329599 */, + 0x1962317fU/* 425865599 */, + 0x1d25e9ffU/* 489023999 */, + 0x21dae4ffU/* 567993599 */, + 0x259e9d7fU/* 631151999 */, + 0x277fd0ffU/* 662687999 */, + 0x2a50f57fU/* 709948799 */, + 0x2c3228ffU/* 741484799 */, + 0x2e135c7fU/* 773020799 */, + 0x30e723ffU/* 820454399 */, + 0x33b8487fU/* 867715199 */, + 0x368c0fffU/* 915148799 */, + 0x43b71b7fU/* 1136073599 */, + 0x495c077fU/* 1230767999 */, + 0x4fef92ffU/* 1341100799 */, + 0x55932d7fU/* 1435708799 */, + 0x5868467fU/* 1483228799 */, + INT32_MAX +}; +const size_t nleaps_s = countof(leaps_s); + +const uint32_t leaps_hms[] = { + UINT32_MAX, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + 0x173b3cU/* 1522492 */, + UINT32_MAX +}; +const size_t nleaps_hms = countof(leaps_hms); + +/* exported number of leap transitions */ +const size_t nleaps = countof(leaps_corr); + +#endif /* INCLUDED_ltrcc_generated_def_ */