[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / includes / timezone.h
1 #ifndef TIMEZONE_H
2 #define TIMEZONE_H
3
4 #define _OSF_SOURCE
5
6 #if TIME_WITH_SYS_TIME
7 # include <sys/time.h>
8 # include <time.h>
9 #else
10 # if HAVE_SYS_TIME_H
11 #  include <sys/time.h>
12 # else
13 #  include <time.h>
14 # endif
15 #endif
16
17 #if HAVE_TM_ZONE
18 #define ZONE(x)     (((struct tm *)x)->tm_zone)
19 #define GMTOFF(x)   (((struct tm *)x)->tm_gmtoff)
20 #else 
21 #if HAVE_TZNAME
22 extern time_t timezone, altzone;
23 extern char *tmzone[2];
24 #define ZONE(x)     (((struct tm *)x)->tm_isdst ? tmzone[1] : tmzone[0])
25 #define GMTOFF(x)   (((struct tm *)x)->tm_isdst ? altzone : timezone)
26 #endif
27 #endif
28
29 #endif