diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c index ba1b7f6a4d..a19ae9e48a 100644 --- a/src/backend/utils/adt/date.c +++ b/src/backend/utils/adt/date.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.50 2000/09/12 05:41:37 thomas Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.51 2000/10/29 13:17:33 petere Exp $ * *------------------------------------------------------------------------- */ @@ -232,7 +232,7 @@ date_timestamp(PG_FUNCTION_ARGS) if (IS_VALID_UTIME(tm->tm_year, tm->tm_mon, tm->tm_mday)) { -#ifdef USE_POSIX_TIME +#if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE) tm->tm_hour = 0; tm->tm_min = 0; tm->tm_sec = 0; @@ -245,7 +245,7 @@ date_timestamp(PG_FUNCTION_ARGS) elog(ERROR, "Unable to convert date to tm"); result = utime + ((date2j(1970,1,1)-date2j(2000,1,1))*86400.0); -#else /* !USE_POSIX_TIME */ +#else result = dateVal*86400.0+CTimeZone; #endif } diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c index 39a39c479d..a4c1abb9ee 100644 --- a/src/backend/utils/adt/datetime.c +++ b/src/backend/utils/adt/datetime.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.53 2000/09/12 05:41:37 thomas Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.54 2000/10/29 13:17:33 petere Exp $ * *------------------------------------------------------------------------- */ @@ -19,13 +19,8 @@ #include #include #include - #include -#ifndef USE_POSIX_TIME -#include -#endif - #include "miscadmin.h" #include "utils/datetime.h" @@ -885,7 +880,7 @@ DecodeDateTime(char **field, int *ftype, int nf, if (IS_VALID_UTIME(tm->tm_year, tm->tm_mon, tm->tm_mday)) { -#ifdef USE_POSIX_TIME +#if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE) tm->tm_year -= 1900; tm->tm_mon -= 1; tm->tm_isdst = -1; @@ -893,20 +888,18 @@ DecodeDateTime(char **field, int *ftype, int nf, tm->tm_year += 1900; tm->tm_mon += 1; -#if defined(HAVE_TM_ZONE) +# if defined(HAVE_TM_ZONE) *tzp = -(tm->tm_gmtoff); /* tm_gmtoff is * Sun/DEC-ism */ -#elif defined(HAVE_INT_TIMEZONE) -#ifdef __CYGWIN__ +# elif defined(HAVE_INT_TIMEZONE) +# ifdef __CYGWIN__ *tzp = ((tm->tm_isdst > 0) ? (_timezone - 3600) : _timezone); -#else +# else *tzp = ((tm->tm_isdst > 0) ? (timezone - 3600) : timezone); -#endif -#else -#error USE_POSIX_TIME is defined but neither HAVE_TM_ZONE or HAVE_INT_TIMEZONE are defined -#endif +# endif /* __CYGWIN__ */ +# endif /* HAVE_INT_TIMEZONE */ -#else /* !USE_POSIX_TIME */ +#else /* not (HAVE_TM_ZONE || HAVE_INT_TIMEZONE) */ *tzp = CTimeZone; #endif } @@ -1139,24 +1132,22 @@ DecodeTimeOnly(char **field, int *ftype, int nf, tmp->tm_min = tm->tm_min; tmp->tm_sec = tm->tm_sec; -#ifdef USE_POSIX_TIME +#if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE) tmp->tm_isdst = -1; mktime(tmp); tm->tm_isdst = tmp->tm_isdst; -#if defined(HAVE_TM_ZONE) +# if defined(HAVE_TM_ZONE) *tzp = -(tmp->tm_gmtoff); /* tm_gmtoff is Sun/DEC-ism */ -#elif defined(HAVE_INT_TIMEZONE) -#ifdef __CYGWIN__ +# elif defined(HAVE_INT_TIMEZONE) +# ifdef __CYGWIN__ *tzp = ((tmp->tm_isdst > 0) ? (_timezone - 3600) : _timezone); -#else +# else *tzp = ((tmp->tm_isdst > 0) ? (timezone - 3600) : timezone); -#endif -#else -#error USE_POSIX_TIME is defined but neither HAVE_TM_ZONE or HAVE_INT_TIMEZONE are defined -#endif +# endif +# endif -#else /* !USE_POSIX_TIME */ +#else /* not (HAVE_TM_ZONE || HAVE_INT_TIMEZONE) */ *tzp = CTimeZone; #endif } diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c index 748bb694d7..b1e412907d 100644 --- a/src/backend/utils/adt/formatting.c +++ b/src/backend/utils/adt/formatting.c @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------- * formatting.c * - * $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.22 2000/09/25 12:58:47 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.23 2000/10/29 13:17:34 petere Exp $ * * * Portions Copyright (c) 1999-2000, PostgreSQL, Inc @@ -2781,34 +2781,32 @@ to_timestamp(PG_FUNCTION_ARGS) if (IS_VALID_UTIME(tm->tm_year, tm->tm_mon, tm->tm_mday)) { -#ifdef USE_POSIX_TIME +#if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE) tm->tm_isdst = -1; tm->tm_year -= 1900; tm->tm_mon -= 1; -#ifdef DEBUG_TO_FROM_CHAR +# ifdef DEBUG_TO_FROM_CHAR elog(DEBUG_elog_output, "TO-FROM_CHAR: Call mktime()"); NOTICE_TM; -#endif +# endif mktime(tm); tm->tm_year += 1900; tm->tm_mon += 1; -#if defined(HAVE_TM_ZONE) +# if defined(HAVE_TM_ZONE) tz = -(tm->tm_gmtoff); /* tm_gmtoff is Sun/DEC-ism */ -#elif defined(HAVE_INT_TIMEZONE) +# elif defined(HAVE_INT_TIMEZONE) -#ifdef __CYGWIN__ +# ifdef __CYGWIN__ tz = (tm->tm_isdst ? (_timezone - 3600) : _timezone); -#else +# else tz = (tm->tm_isdst ? (timezone - 3600) : timezone); -#endif +# endif -#else -#error USE_POSIX_TIME is defined but neither HAVE_TM_ZONE or HAVE_INT_TIMEZONE are defined -#endif +# endif -#else /* !USE_POSIX_TIME */ +#else /* not (HAVE_TM_ZONE || HAVE_INT_TIMEZONE) */ tz = CTimeZone; #endif } diff --git a/src/backend/utils/adt/nabstime.c b/src/backend/utils/adt/nabstime.c index 61973c46cf..a7ee883f7b 100644 --- a/src/backend/utils/adt/nabstime.c +++ b/src/backend/utils/adt/nabstime.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.74 2000/09/29 13:53:31 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.75 2000/10/29 13:17:34 petere Exp $ * * NOTES * @@ -24,7 +24,7 @@ #include #include -#ifndef USE_POSIX_TIME +#if !(defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE)) #include #endif @@ -126,11 +126,11 @@ GetCurrentAbsoluteTime(void) { time_t now; -#ifdef USE_POSIX_TIME +#if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE) struct tm *tm; now = time(NULL); -#else /* ! USE_POSIX_TIME */ +#else struct timeb tb; /* the old V7-ism */ ftime(&tb); @@ -139,7 +139,6 @@ GetCurrentAbsoluteTime(void) if (!HasCTZSet) { -#ifdef USE_POSIX_TIME #if defined(HAVE_TM_ZONE) tm = localtime(&now); @@ -166,16 +165,13 @@ GetCurrentAbsoluteTime(void) CDayLight = tm->tm_isdst; CTimeZone = -#ifdef __CYGWIN__ +# ifdef __CYGWIN__ (tm->tm_isdst ? (_timezone - 3600) : _timezone); -#else +# else (tm->tm_isdst ? (timezone - 3600) : timezone); -#endif +# endif strcpy(CTZName, tzname[tm->tm_isdst]); -#else -#error USE_POSIX_TIME defined but no time zone available -#endif -#else /* ! USE_POSIX_TIME */ +#else /* neither HAVE_TM_ZONE nor HAVE_INT_TIMEZONE */ CTimeZone = tb.timezone * 60; CDayLight = (tb.dstflag != 0); @@ -206,25 +202,23 @@ void abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char *tzn) { time_t time = (time_t) _time; -#ifdef USE_POSIX_TIME +#if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE) struct tm *tx; -#else /* ! USE_POSIX_TIME */ +#else struct timeb tb; /* the old V7-ism */ ftime(&tb); #endif -#ifdef USE_POSIX_TIME + +#if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE) if (tzp != NULL) tx = localtime((time_t *) &time); else { tx = gmtime((time_t *) &time); }; -#endif - -#ifdef USE_POSIX_TIME tm->tm_year = tx->tm_year + 1900; tm->tm_mon = tx->tm_mon + 1; @@ -234,7 +228,7 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char *tzn) tm->tm_sec = tx->tm_sec; tm->tm_isdst = tx->tm_isdst; -#if defined(HAVE_TM_ZONE) +# if defined(HAVE_TM_ZONE) tm->tm_gmtoff = tx->tm_gmtoff; tm->tm_zone = tx->tm_zone; @@ -252,13 +246,13 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char *tzn) if (strlen(tm->tm_zone) > MAXTZLEN) elog(NOTICE, "Invalid timezone \'%s\'", tm->tm_zone); } -#elif defined(HAVE_INT_TIMEZONE) +# elif defined(HAVE_INT_TIMEZONE) if (tzp != NULL) -#ifdef __CYGWIN__ +# ifdef __CYGWIN__ *tzp = (tm->tm_isdst ? (_timezone - 3600) : _timezone); -#else +# else *tzp = (tm->tm_isdst ? (timezone - 3600) : timezone); -#endif +# endif if (tzn != NULL) { @@ -270,10 +264,8 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char *tzn) if (strlen(tzname[tm->tm_isdst]) > MAXTZLEN) elog(NOTICE, "Invalid timezone \'%s\'", tzname[tm->tm_isdst]); } -#else -#error POSIX time support is broken -#endif -#else /* ! USE_POSIX_TIME */ +# endif +#else /* not (HAVE_TM_ZONE || HAVE_INT_TIMEZONE) */ if (tzp != NULL) *tzp = tb.timezone * 60; diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c index 8894f60d54..21fd9d7618 100644 --- a/src/backend/utils/adt/timestamp.c +++ b/src/backend/utils/adt/timestamp.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.35 2000/08/29 04:41:47 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.36 2000/10/29 13:17:34 petere Exp $ * *------------------------------------------------------------------------- */ @@ -22,10 +22,6 @@ #include #include -#ifndef USE_POSIX_TIME -#include -#endif - #include "access/hash.h" #include "access/xact.h" #include "miscadmin.h" @@ -282,7 +278,7 @@ timestamp2tm(Timestamp dt, int *tzp, struct tm * tm, double *fsec, char **tzn) sec; time_t utime; -#ifdef USE_POSIX_TIME +#if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE) struct tm *tx; #endif @@ -317,7 +313,7 @@ timestamp2tm(Timestamp dt, int *tzp, struct tm * tm, double *fsec, char **tzn) { utime = (dt + (date0 - date2j(1970, 1, 1)) * 86400); -#ifdef USE_POSIX_TIME +#if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE) tx = localtime(&utime); tm->tm_year = tx->tm_year + 1900; tm->tm_mon = tx->tm_mon + 1; @@ -336,26 +332,24 @@ timestamp2tm(Timestamp dt, int *tzp, struct tm * tm, double *fsec, char **tzn) #endif tm->tm_isdst = tx->tm_isdst; -#if defined(HAVE_TM_ZONE) +# if defined(HAVE_TM_ZONE) tm->tm_gmtoff = tx->tm_gmtoff; tm->tm_zone = tx->tm_zone; *tzp = -(tm->tm_gmtoff); /* tm_gmtoff is Sun/DEC-ism */ if (tzn != NULL) *tzn = (char *) tm->tm_zone; -#elif defined(HAVE_INT_TIMEZONE) -#ifdef __CYGWIN__ +# elif defined(HAVE_INT_TIMEZONE) +# ifdef __CYGWIN__ *tzp = (tm->tm_isdst ? (_timezone - 3600) : _timezone); -#else +# else *tzp = (tm->tm_isdst ? (timezone - 3600) : timezone); -#endif +# endif if (tzn != NULL) *tzn = tzname[(tm->tm_isdst > 0)]; -#else -#error USE_POSIX_TIME is defined but neither HAVE_TM_ZONE or HAVE_INT_TIMEZONE are defined -#endif +# endif -#else /* !USE_POSIX_TIME */ +#else /* not (HAVE_TM_ZONE || HAVE_INT_TIMEZONE) */ *tzp = CTimeZone; /* V7 conventions; don't know timezone? */ if (tzn != NULL) *tzn = CTZName; @@ -1629,7 +1623,7 @@ timestamp_trunc(PG_FUNCTION_ARGS) if (IS_VALID_UTIME(tm->tm_year, tm->tm_mon, tm->tm_mday)) { -#ifdef USE_POSIX_TIME +#if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE) tm->tm_isdst = -1; tm->tm_year -= 1900; tm->tm_mon -= 1; @@ -1638,21 +1632,19 @@ timestamp_trunc(PG_FUNCTION_ARGS) tm->tm_year += 1900; tm->tm_mon += 1; -#if defined(HAVE_TM_ZONE) +# if defined(HAVE_TM_ZONE) tz = -(tm->tm_gmtoff); /* tm_gmtoff is Sun/DEC-ism */ -#elif defined(HAVE_INT_TIMEZONE) +# elif defined(HAVE_INT_TIMEZONE) -#ifdef __CYGWIN__ +# ifdef __CYGWIN__ tz = (tm->tm_isdst ? (_timezone - 3600) : _timezone); -#else +# else tz = (tm->tm_isdst ? (timezone - 3600) : timezone); -#endif +# endif -#else -#error USE_POSIX_TIME is defined but neither HAVE_TM_ZONE or HAVE_INT_TIMEZONE are defined -#endif +# endif -#else /* !USE_POSIX_TIME */ +#else /* not (HAVE_TM_ZONE || HAVE_INT_TIMEZONE) */ tz = CTimeZone; #endif } diff --git a/src/include/port/aix.h b/src/include/port/aix.h index 39c9a79a9c..782d84bb91 100644 --- a/src/include/port/aix.h +++ b/src/include/port/aix.h @@ -1,4 +1,3 @@ -#define USE_POSIX_TIME #define CLASS_CONFLICT #define DISABLE_XOPEN_NLS #define HAS_TEST_AND_SET diff --git a/src/include/port/beos.h b/src/include/port/beos.h index b27015d46e..0618dc3ffd 100644 --- a/src/include/port/beos.h +++ b/src/include/port/beos.h @@ -1,7 +1,6 @@ #include #include "kernel/image.h" -#define USE_POSIX_TIME #define HAS_TEST_AND_SET typedef unsigned char slock_t; diff --git a/src/include/port/bsdi.h b/src/include/port/bsdi.h index bb6cbb801e..f486536113 100644 --- a/src/include/port/bsdi.h +++ b/src/include/port/bsdi.h @@ -5,7 +5,6 @@ #define NEED_SPARC_TAS_ASM #endif -#define USE_POSIX_TIME #define HAS_TEST_AND_SET typedef unsigned char slock_t; diff --git a/src/include/port/dgux.h b/src/include/port/dgux.h index f08580cfaf..d8fd311e69 100644 --- a/src/include/port/dgux.h +++ b/src/include/port/dgux.h @@ -1,5 +1,3 @@ -#define USE_POSIX_TIME - #ifndef BIG_ENDIAN #define BIG_ENDIAN 4321 #endif diff --git a/src/include/port/freebsd.h b/src/include/port/freebsd.h index 162ff5acfd..ec92644a15 100644 --- a/src/include/port/freebsd.h +++ b/src/include/port/freebsd.h @@ -1,5 +1,3 @@ -#define USE_POSIX_TIME - #if defined(__i386__) #define NEED_I386_TAS_ASM #define HAS_TEST_AND_SET diff --git a/src/include/port/hpux.h b/src/include/port/hpux.h index b265d4173f..870b12f263 100644 --- a/src/include/port/hpux.h +++ b/src/include/port/hpux.h @@ -1,4 +1,3 @@ -#define USE_POSIX_TIME #define HAS_TEST_AND_SET typedef struct { diff --git a/src/include/port/irix5.h b/src/include/port/irix5.h index 8451ee95d8..6687960049 100644 --- a/src/include/port/irix5.h +++ b/src/include/port/irix5.h @@ -1,3 +1,2 @@ -#define USE_POSIX_TIME #define HAS_TEST_AND_SET typedef unsigned long slock_t; diff --git a/src/include/port/linux.h b/src/include/port/linux.h index 366932122c..b6eb10f3d6 100644 --- a/src/include/port/linux.h +++ b/src/include/port/linux.h @@ -1,11 +1,3 @@ -/* __USE_POSIX, __USE_BSD, and __USE_BSD_SIGNAL used to be defined either - here or with -D compile options, but __ macros should be set and used by C - library macros, not Postgres code. __USE_POSIX is set by features.h, - __USE_BSD is set by bsd/signal.h, and __USE_BSD_SIGNAL appears not to - be used. -*/ -#define USE_POSIX_TIME - #if defined(__i386__) typedef unsigned char slock_t; @@ -42,13 +34,3 @@ typedef unsigned int slock_t; #define HAS_TEST_AND_SET #endif - -#if defined(__GLIBC__) && (__GLIBC__ >= 2) -#ifdef HAVE_INT_TIMEZONE -#undef HAVE_INT_TIMEZONE -#endif -#endif - -#if defined(__powerpc__) -#undef HAVE_INT_TIMEZONE -#endif diff --git a/src/include/port/netbsd.h b/src/include/port/netbsd.h index dc01930325..63e4236248 100644 --- a/src/include/port/netbsd.h +++ b/src/include/port/netbsd.h @@ -1,5 +1,3 @@ -#define USE_POSIX_TIME - #if defined(__i386__) #define NEED_I386_TAS_ASM #define HAS_TEST_AND_SET diff --git a/src/include/port/openbsd.h b/src/include/port/openbsd.h index dc01930325..63e4236248 100644 --- a/src/include/port/openbsd.h +++ b/src/include/port/openbsd.h @@ -1,5 +1,3 @@ -#define USE_POSIX_TIME - #if defined(__i386__) #define NEED_I386_TAS_ASM #define HAS_TEST_AND_SET diff --git a/src/include/port/osf.h b/src/include/port/osf.h index 6c0d7b2afd..c43671811d 100644 --- a/src/include/port/osf.h +++ b/src/include/port/osf.h @@ -1,5 +1,4 @@ #define NOFIXADE -#define USE_POSIX_TIME #define DISABLE_XOPEN_NLS #define HAS_TEST_AND_SET /*#include */ /* for msemaphore */ diff --git a/src/include/port/qnx4.h b/src/include/port/qnx4.h index d60555f104..54cbbb6fb3 100644 --- a/src/include/port/qnx4.h +++ b/src/include/port/qnx4.h @@ -9,7 +9,6 @@ #include /* for sem_t */ #endif -#define USE_POSIX_TIME #define HAS_TEST_AND_SET #define HAVE_STRING_H diff --git a/src/include/port/sco.h b/src/include/port/sco.h index 2b1187e7ea..04d3a506d6 100644 --- a/src/include/port/sco.h +++ b/src/include/port/sco.h @@ -4,8 +4,6 @@ #define DISABLE_COMPLEX_MACRO -#define USE_POSIX_TIME - #define HAS_TEST_AND_SET #define NEED_I386_TAS_ASM diff --git a/src/include/port/solaris.h b/src/include/port/solaris.h index 388e9f8b41..6851b6ce04 100644 --- a/src/include/port/solaris.h +++ b/src/include/port/solaris.h @@ -1,6 +1,5 @@ -/* $Header: /cvsroot/pgsql/src/include/port/solaris.h,v 1.2 2000/10/28 22:53:17 petere Exp $ */ +/* $Header: /cvsroot/pgsql/src/include/port/solaris.h,v 1.3 2000/10/29 13:17:34 petere Exp $ */ -#define USE_POSIX_TIME #define HAS_TEST_AND_SET typedef unsigned char slock_t; diff --git a/src/include/port/sunos4.h b/src/include/port/sunos4.h index e9c0ec29d4..06c5ba99e3 100644 --- a/src/include/port/sunos4.h +++ b/src/include/port/sunos4.h @@ -1,4 +1,3 @@ -#define USE_POSIX_TIME #define HAS_TEST_AND_SET typedef unsigned char slock_t; diff --git a/src/include/port/svr4.h b/src/include/port/svr4.h index b6ca301e99..2c6e2b4e71 100644 --- a/src/include/port/svr4.h +++ b/src/include/port/svr4.h @@ -1,5 +1,3 @@ -#define USE_POSIX_TIME - #ifndef BYTE_ORDER #ifdef MIPSEB #define BYTE_ORDER BIG_ENDIAN diff --git a/src/include/port/ultrix4.h b/src/include/port/ultrix4.h index b88b701503..2dbbe6ceec 100644 --- a/src/include/port/ultrix4.h +++ b/src/include/port/ultrix4.h @@ -1,5 +1,4 @@ #define NOFIXADE -#define USE_POSIX_TIME #define NEED_STRDUP #ifndef BIG_ENDIAN diff --git a/src/include/port/univel.h b/src/include/port/univel.h index 4f9853d52b..f51729448d 100644 --- a/src/include/port/univel.h +++ b/src/include/port/univel.h @@ -1,5 +1,3 @@ -#define USE_POSIX_TIME - #define HAS_TEST_AND_SET #define NEED_I386_TAS_ASM diff --git a/src/include/port/unixware.h b/src/include/port/unixware.h index 00fe4501c2..380a19078f 100644 --- a/src/include/port/unixware.h +++ b/src/include/port/unixware.h @@ -1,5 +1,3 @@ -#define USE_POSIX_TIME - #define HAS_TEST_AND_SET #define NEED_I386_TAS_ASM diff --git a/src/include/port/win.h b/src/include/port/win.h index f30979fd22..bae6de53f6 100644 --- a/src/include/port/win.h +++ b/src/include/port/win.h @@ -6,7 +6,6 @@ typedef unsigned char slock_t; #endif #define tzname _tzname /* should be in time.h? */ -#define USE_POSIX_TIME #define HAVE_INT_TIMEZONE /* has int _timezone */ #include