summaryrefslogtreecommitdiff
path: root/src/libstddjb/tai_from_ltm64.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-01-02 10:15:29 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-01-02 10:15:29 +0000
commit4fd65aec913a1b99e8d748a7a82c150b8f7ee510 (patch)
treed34ac61e9cca0729320c0854c87a3163efd52836 /src/libstddjb/tai_from_ltm64.c
parent131a18f68dc73f208bb76a944fc6d42c86cfad3b (diff)
downloadskalibs-4fd65aec913a1b99e8d748a7a82c150b8f7ee510.tar.xz
Remove the --enable-right-tz configure option.
Make it a run-time autodetection instead. Update doc. Thanks to Paul Jarc for the suggestion.
Diffstat (limited to 'src/libstddjb/tai_from_ltm64.c')
-rw-r--r--src/libstddjb/tai_from_ltm64.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/libstddjb/tai_from_ltm64.c b/src/libstddjb/tai_from_ltm64.c
index 2538c00..12a7394 100644
--- a/src/libstddjb/tai_from_ltm64.c
+++ b/src/libstddjb/tai_from_ltm64.c
@@ -1,23 +1,16 @@
/* ISC license. */
-#include <skalibs/config.h>
#include <skalibs/uint64.h>
#include <skalibs/tai.h>
#include <skalibs/djbtime.h>
-
-#ifdef SKALIBS_FLAG_TZISRIGHT
+#include "djbtime-internal.h"
int tai_from_ltm64 (tai_t *t, uint64 u)
{
- tai_u64(t, u + 10U) ;
- return 1 ;
+ switch (skalibs_tzisright())
+ {
+ case 1 : tai_u64(t, u + 10U) ; return 1 ;
+ case 0 : return tai_from_utc(t, u) ;
+ default : return 0 ;
+ }
}
-
-#else
-
-int tai_from_ltm64 (tai_t *t, uint64 u)
-{
- return tai_from_utc(t, u) ;
-}
-
-#endif