[project @ 1996-07-19 18:36:04 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 SETZONE(x,z)     (((struct tm *)x)->tm_zone = z)
20 #define GMTOFF(x)        (((struct tm *)x)->tm_gmtoff)
21 #else 
22 #if HAVE_TZNAME
23 extern time_t timezone, altzone;
24 extern char *tzname[2];
25 #define ZONE(x)          (((struct tm *)x)->tm_isdst ? tzname[1] : tzname[0])
26 #define SETZONE(x,z)
27 #define GMTOFF(x)        (((struct tm *)x)->tm_isdst ? altzone : timezone)
28 #endif
29 #endif
30
31 #endif