2 #include "time64_config.h"
8 /* Set our custom types */
9 typedef INT_64_T Int64;
10 typedef Int64 Time64_T;
14 /* A copy of the tm struct but with a 64 bit year */
26 #ifdef HAS_TM_TM_GMTOFF
40 /* Decide which tm struct to use */
48 /* Declare functions */
49 static struct TM *S_gmtime64_r (const Time64_T *, struct TM *);
50 static struct TM *S_localtime64_r (const Time64_T *, struct TM *);
51 static Time64_T S_timegm64 (struct TM *);
54 /* Not everyone has gm/localtime_r(), provide a replacement */
55 #ifdef HAS_LOCALTIME_R
56 # define LOCALTIME_R(clock, result) (L_R_TZSET localtime_r(clock, result))
58 # define LOCALTIME_R(clock, result) (L_R_TZSET S_localtime_r(clock, result))
61 # define GMTIME_R(clock, result) gmtime_r(clock, result)
63 # define GMTIME_R(clock, result) S_gmtime_r(clock, result)