summaryrefslogtreecommitdiff
path: root/src/libstddjb/djbtime-internal.h
blob: 819b88a0a55a51fc74ba9f067eabc5d282d30635 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* 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)


 /* Run-time test: does the current timezone handle leap seconds ? */

extern int skalibs_tzisright (void) ;

#endif