This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Various updates and fixes to some of the SysV IPC ops and their tests
[perl5.git] / time64.h
CommitLineData
806a119a 1#include <time.h>
b86b480f 2#include "time64_config.h"
806a119a 3
6a5bc5ac
KW
4#ifndef PERL_TIME64_H_
5# define PERL_TIME64_H_
a272e669 6
948ea7a9 7
b86b480f
MS
8/* Set our custom types */
9typedef INT_64_T Int64;
10typedef Int64 Time64_T;
d95a2ea5 11typedef I32 Year;
948ea7a9 12
806a119a
MS
13
14/* A copy of the tm struct but with a 64 bit year */
15struct TM64 {
16 int tm_sec;
17 int tm_min;
18 int tm_hour;
19 int tm_mday;
20 int tm_mon;
21 Year tm_year;
22 int tm_wday;
23 int tm_yday;
24 int tm_isdst;
25
26#ifdef HAS_TM_TM_GMTOFF
27 long tm_gmtoff;
28#endif
29
30#ifdef HAS_TM_TM_ZONE
926c3ce3 31 const char *tm_zone;
806a119a
MS
32#endif
33};
a272e669 34
948ea7a9 35
b86b480f
MS
36/* Decide which tm struct to use */
37#ifdef USE_TM64
38#define TM TM64
39#else
40#define TM tm
41#endif
42
43
7430375d 44/* Declare functions */
f832b29a
JH
45struct TM *Perl_gmtime64_r (const Time64_T *, struct TM *);
46struct TM *Perl_localtime64_r (const Time64_T *, struct TM *);
b86b480f 47
a272e669 48#endif