Commit 525e1c44 authored by Peter Eisentraut's avatar Peter Eisentraut

USE_POSIX_TIME replaced by HAVE_TM_ZONE || HAVE_INT_TIMEZONE, which are

equivalent.

In linux.h there were some #undef HAVE_INT_TIMEZONE, which are useless
because HAVE_TM_ZONE overrides it anyway, and messing with configure
results isn't cool.
parent 8b043112
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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) ...@@ -232,7 +232,7 @@ date_timestamp(PG_FUNCTION_ARGS)
if (IS_VALID_UTIME(tm->tm_year, tm->tm_mon, tm->tm_mday)) 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_hour = 0;
tm->tm_min = 0; tm->tm_min = 0;
tm->tm_sec = 0; tm->tm_sec = 0;
...@@ -245,7 +245,7 @@ date_timestamp(PG_FUNCTION_ARGS) ...@@ -245,7 +245,7 @@ date_timestamp(PG_FUNCTION_ARGS)
elog(ERROR, "Unable to convert date to tm"); elog(ERROR, "Unable to convert date to tm");
result = utime + ((date2j(1970,1,1)-date2j(2000,1,1))*86400.0); result = utime + ((date2j(1970,1,1)-date2j(2000,1,1))*86400.0);
#else /* !USE_POSIX_TIME */ #else
result = dateVal*86400.0+CTimeZone; result = dateVal*86400.0+CTimeZone;
#endif #endif
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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 @@ ...@@ -19,13 +19,8 @@
#include <sys/types.h> #include <sys/types.h>
#include <errno.h> #include <errno.h>
#include <float.h> #include <float.h>
#include <limits.h> #include <limits.h>
#ifndef USE_POSIX_TIME
#include <sys/timeb.h>
#endif
#include "miscadmin.h" #include "miscadmin.h"
#include "utils/datetime.h" #include "utils/datetime.h"
...@@ -885,7 +880,7 @@ DecodeDateTime(char **field, int *ftype, int nf, ...@@ -885,7 +880,7 @@ DecodeDateTime(char **field, int *ftype, int nf,
if (IS_VALID_UTIME(tm->tm_year, tm->tm_mon, tm->tm_mday)) 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_year -= 1900;
tm->tm_mon -= 1; tm->tm_mon -= 1;
tm->tm_isdst = -1; tm->tm_isdst = -1;
...@@ -893,20 +888,18 @@ DecodeDateTime(char **field, int *ftype, int nf, ...@@ -893,20 +888,18 @@ DecodeDateTime(char **field, int *ftype, int nf,
tm->tm_year += 1900; tm->tm_year += 1900;
tm->tm_mon += 1; tm->tm_mon += 1;
#if defined(HAVE_TM_ZONE) # if defined(HAVE_TM_ZONE)
*tzp = -(tm->tm_gmtoff); /* tm_gmtoff is *tzp = -(tm->tm_gmtoff); /* tm_gmtoff is
* Sun/DEC-ism */ * Sun/DEC-ism */
#elif defined(HAVE_INT_TIMEZONE) # elif defined(HAVE_INT_TIMEZONE)
#ifdef __CYGWIN__ # ifdef __CYGWIN__
*tzp = ((tm->tm_isdst > 0) ? (_timezone - 3600) : _timezone); *tzp = ((tm->tm_isdst > 0) ? (_timezone - 3600) : _timezone);
#else # else
*tzp = ((tm->tm_isdst > 0) ? (timezone - 3600) : timezone); *tzp = ((tm->tm_isdst > 0) ? (timezone - 3600) : timezone);
#endif # endif /* __CYGWIN__ */
#else # endif /* HAVE_INT_TIMEZONE */
#error USE_POSIX_TIME is defined but neither HAVE_TM_ZONE or HAVE_INT_TIMEZONE are defined
#endif
#else /* !USE_POSIX_TIME */ #else /* not (HAVE_TM_ZONE || HAVE_INT_TIMEZONE) */
*tzp = CTimeZone; *tzp = CTimeZone;
#endif #endif
} }
...@@ -1139,24 +1132,22 @@ DecodeTimeOnly(char **field, int *ftype, int nf, ...@@ -1139,24 +1132,22 @@ DecodeTimeOnly(char **field, int *ftype, int nf,
tmp->tm_min = tm->tm_min; tmp->tm_min = tm->tm_min;
tmp->tm_sec = tm->tm_sec; tmp->tm_sec = tm->tm_sec;
#ifdef USE_POSIX_TIME #if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE)
tmp->tm_isdst = -1; tmp->tm_isdst = -1;
mktime(tmp); mktime(tmp);
tm->tm_isdst = tmp->tm_isdst; 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 */ *tzp = -(tmp->tm_gmtoff); /* tm_gmtoff is Sun/DEC-ism */
#elif defined(HAVE_INT_TIMEZONE) # elif defined(HAVE_INT_TIMEZONE)
#ifdef __CYGWIN__ # ifdef __CYGWIN__
*tzp = ((tmp->tm_isdst > 0) ? (_timezone - 3600) : _timezone); *tzp = ((tmp->tm_isdst > 0) ? (_timezone - 3600) : _timezone);
#else # else
*tzp = ((tmp->tm_isdst > 0) ? (timezone - 3600) : timezone); *tzp = ((tmp->tm_isdst > 0) ? (timezone - 3600) : timezone);
#endif # endif
#else # endif
#error USE_POSIX_TIME is defined but neither HAVE_TM_ZONE or HAVE_INT_TIMEZONE are defined
#endif
#else /* !USE_POSIX_TIME */ #else /* not (HAVE_TM_ZONE || HAVE_INT_TIMEZONE) */
*tzp = CTimeZone; *tzp = CTimeZone;
#endif #endif
} }
......
/* ----------------------------------------------------------------------- /* -----------------------------------------------------------------------
* formatting.c * 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 * Portions Copyright (c) 1999-2000, PostgreSQL, Inc
...@@ -2781,34 +2781,32 @@ to_timestamp(PG_FUNCTION_ARGS) ...@@ -2781,34 +2781,32 @@ to_timestamp(PG_FUNCTION_ARGS)
if (IS_VALID_UTIME(tm->tm_year, tm->tm_mon, tm->tm_mday)) 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_isdst = -1;
tm->tm_year -= 1900; tm->tm_year -= 1900;
tm->tm_mon -= 1; tm->tm_mon -= 1;
#ifdef DEBUG_TO_FROM_CHAR # ifdef DEBUG_TO_FROM_CHAR
elog(DEBUG_elog_output, "TO-FROM_CHAR: Call mktime()"); elog(DEBUG_elog_output, "TO-FROM_CHAR: Call mktime()");
NOTICE_TM; NOTICE_TM;
#endif # endif
mktime(tm); mktime(tm);
tm->tm_year += 1900; tm->tm_year += 1900;
tm->tm_mon += 1; tm->tm_mon += 1;
#if defined(HAVE_TM_ZONE) # if defined(HAVE_TM_ZONE)
tz = -(tm->tm_gmtoff); /* tm_gmtoff is Sun/DEC-ism */ 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); tz = (tm->tm_isdst ? (_timezone - 3600) : _timezone);
#else # else
tz = (tm->tm_isdst ? (timezone - 3600) : timezone); tz = (tm->tm_isdst ? (timezone - 3600) : timezone);
#endif # endif
#else # endif
#error USE_POSIX_TIME is defined but neither HAVE_TM_ZONE or HAVE_INT_TIMEZONE are defined
#endif
#else /* !USE_POSIX_TIME */ #else /* not (HAVE_TM_ZONE || HAVE_INT_TIMEZONE) */
tz = CTimeZone; tz = CTimeZone;
#endif #endif
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * 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 * NOTES
* *
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include <float.h> #include <float.h>
#include <limits.h> #include <limits.h>
#ifndef USE_POSIX_TIME #if !(defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE))
#include <sys/timeb.h> #include <sys/timeb.h>
#endif #endif
...@@ -126,11 +126,11 @@ GetCurrentAbsoluteTime(void) ...@@ -126,11 +126,11 @@ GetCurrentAbsoluteTime(void)
{ {
time_t now; time_t now;
#ifdef USE_POSIX_TIME #if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE)
struct tm *tm; struct tm *tm;
now = time(NULL); now = time(NULL);
#else /* ! USE_POSIX_TIME */ #else
struct timeb tb; /* the old V7-ism */ struct timeb tb; /* the old V7-ism */
ftime(&tb); ftime(&tb);
...@@ -139,7 +139,6 @@ GetCurrentAbsoluteTime(void) ...@@ -139,7 +139,6 @@ GetCurrentAbsoluteTime(void)
if (!HasCTZSet) if (!HasCTZSet)
{ {
#ifdef USE_POSIX_TIME
#if defined(HAVE_TM_ZONE) #if defined(HAVE_TM_ZONE)
tm = localtime(&now); tm = localtime(&now);
...@@ -166,16 +165,13 @@ GetCurrentAbsoluteTime(void) ...@@ -166,16 +165,13 @@ GetCurrentAbsoluteTime(void)
CDayLight = tm->tm_isdst; CDayLight = tm->tm_isdst;
CTimeZone = CTimeZone =
#ifdef __CYGWIN__ # ifdef __CYGWIN__
(tm->tm_isdst ? (_timezone - 3600) : _timezone); (tm->tm_isdst ? (_timezone - 3600) : _timezone);
#else # else
(tm->tm_isdst ? (timezone - 3600) : timezone); (tm->tm_isdst ? (timezone - 3600) : timezone);
#endif # endif
strcpy(CTZName, tzname[tm->tm_isdst]); strcpy(CTZName, tzname[tm->tm_isdst]);
#else #else /* neither HAVE_TM_ZONE nor HAVE_INT_TIMEZONE */
#error USE_POSIX_TIME defined but no time zone available
#endif
#else /* ! USE_POSIX_TIME */
CTimeZone = tb.timezone * 60; CTimeZone = tb.timezone * 60;
CDayLight = (tb.dstflag != 0); CDayLight = (tb.dstflag != 0);
...@@ -206,25 +202,23 @@ void ...@@ -206,25 +202,23 @@ void
abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char *tzn) abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char *tzn)
{ {
time_t time = (time_t) _time; time_t time = (time_t) _time;
#ifdef USE_POSIX_TIME #if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE)
struct tm *tx; struct tm *tx;
#else /* ! USE_POSIX_TIME */ #else
struct timeb tb; /* the old V7-ism */ struct timeb tb; /* the old V7-ism */
ftime(&tb); ftime(&tb);
#endif #endif
#ifdef USE_POSIX_TIME
#if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE)
if (tzp != NULL) if (tzp != NULL)
tx = localtime((time_t *) &time); tx = localtime((time_t *) &time);
else else
{ {
tx = gmtime((time_t *) &time); tx = gmtime((time_t *) &time);
}; };
#endif
#ifdef USE_POSIX_TIME
tm->tm_year = tx->tm_year + 1900; tm->tm_year = tx->tm_year + 1900;
tm->tm_mon = tx->tm_mon + 1; tm->tm_mon = tx->tm_mon + 1;
...@@ -234,7 +228,7 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char *tzn) ...@@ -234,7 +228,7 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char *tzn)
tm->tm_sec = tx->tm_sec; tm->tm_sec = tx->tm_sec;
tm->tm_isdst = tx->tm_isdst; tm->tm_isdst = tx->tm_isdst;
#if defined(HAVE_TM_ZONE) # if defined(HAVE_TM_ZONE)
tm->tm_gmtoff = tx->tm_gmtoff; tm->tm_gmtoff = tx->tm_gmtoff;
tm->tm_zone = tx->tm_zone; tm->tm_zone = tx->tm_zone;
...@@ -252,13 +246,13 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char *tzn) ...@@ -252,13 +246,13 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char *tzn)
if (strlen(tm->tm_zone) > MAXTZLEN) if (strlen(tm->tm_zone) > MAXTZLEN)
elog(NOTICE, "Invalid timezone \'%s\'", tm->tm_zone); elog(NOTICE, "Invalid timezone \'%s\'", tm->tm_zone);
} }
#elif defined(HAVE_INT_TIMEZONE) # elif defined(HAVE_INT_TIMEZONE)
if (tzp != NULL) if (tzp != NULL)
#ifdef __CYGWIN__ # ifdef __CYGWIN__
*tzp = (tm->tm_isdst ? (_timezone - 3600) : _timezone); *tzp = (tm->tm_isdst ? (_timezone - 3600) : _timezone);
#else # else
*tzp = (tm->tm_isdst ? (timezone - 3600) : timezone); *tzp = (tm->tm_isdst ? (timezone - 3600) : timezone);
#endif # endif
if (tzn != NULL) if (tzn != NULL)
{ {
...@@ -270,10 +264,8 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char *tzn) ...@@ -270,10 +264,8 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char *tzn)
if (strlen(tzname[tm->tm_isdst]) > MAXTZLEN) if (strlen(tzname[tm->tm_isdst]) > MAXTZLEN)
elog(NOTICE, "Invalid timezone \'%s\'", tzname[tm->tm_isdst]); elog(NOTICE, "Invalid timezone \'%s\'", tzname[tm->tm_isdst]);
} }
#else # endif
#error POSIX time support is broken #else /* not (HAVE_TM_ZONE || HAVE_INT_TIMEZONE) */
#endif
#else /* ! USE_POSIX_TIME */
if (tzp != NULL) if (tzp != NULL)
*tzp = tb.timezone * 60; *tzp = tb.timezone * 60;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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 @@ ...@@ -22,10 +22,6 @@
#include <float.h> #include <float.h>
#include <limits.h> #include <limits.h>
#ifndef USE_POSIX_TIME
#include <sys/timeb.h>
#endif
#include "access/hash.h" #include "access/hash.h"
#include "access/xact.h" #include "access/xact.h"
#include "miscadmin.h" #include "miscadmin.h"
...@@ -282,7 +278,7 @@ timestamp2tm(Timestamp dt, int *tzp, struct tm * tm, double *fsec, char **tzn) ...@@ -282,7 +278,7 @@ timestamp2tm(Timestamp dt, int *tzp, struct tm * tm, double *fsec, char **tzn)
sec; sec;
time_t utime; time_t utime;
#ifdef USE_POSIX_TIME #if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE)
struct tm *tx; struct tm *tx;
#endif #endif
...@@ -317,7 +313,7 @@ timestamp2tm(Timestamp dt, int *tzp, struct tm * tm, double *fsec, char **tzn) ...@@ -317,7 +313,7 @@ timestamp2tm(Timestamp dt, int *tzp, struct tm * tm, double *fsec, char **tzn)
{ {
utime = (dt + (date0 - date2j(1970, 1, 1)) * 86400); utime = (dt + (date0 - date2j(1970, 1, 1)) * 86400);
#ifdef USE_POSIX_TIME #if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE)
tx = localtime(&utime); tx = localtime(&utime);
tm->tm_year = tx->tm_year + 1900; tm->tm_year = tx->tm_year + 1900;
tm->tm_mon = tx->tm_mon + 1; tm->tm_mon = tx->tm_mon + 1;
...@@ -336,26 +332,24 @@ timestamp2tm(Timestamp dt, int *tzp, struct tm * tm, double *fsec, char **tzn) ...@@ -336,26 +332,24 @@ timestamp2tm(Timestamp dt, int *tzp, struct tm * tm, double *fsec, char **tzn)
#endif #endif
tm->tm_isdst = tx->tm_isdst; tm->tm_isdst = tx->tm_isdst;
#if defined(HAVE_TM_ZONE) # if defined(HAVE_TM_ZONE)
tm->tm_gmtoff = tx->tm_gmtoff; tm->tm_gmtoff = tx->tm_gmtoff;
tm->tm_zone = tx->tm_zone; tm->tm_zone = tx->tm_zone;
*tzp = -(tm->tm_gmtoff); /* tm_gmtoff is Sun/DEC-ism */ *tzp = -(tm->tm_gmtoff); /* tm_gmtoff is Sun/DEC-ism */
if (tzn != NULL) if (tzn != NULL)
*tzn = (char *) tm->tm_zone; *tzn = (char *) tm->tm_zone;
#elif defined(HAVE_INT_TIMEZONE) # elif defined(HAVE_INT_TIMEZONE)
#ifdef __CYGWIN__ # ifdef __CYGWIN__
*tzp = (tm->tm_isdst ? (_timezone - 3600) : _timezone); *tzp = (tm->tm_isdst ? (_timezone - 3600) : _timezone);
#else # else
*tzp = (tm->tm_isdst ? (timezone - 3600) : timezone); *tzp = (tm->tm_isdst ? (timezone - 3600) : timezone);
#endif # endif
if (tzn != NULL) if (tzn != NULL)
*tzn = tzname[(tm->tm_isdst > 0)]; *tzn = tzname[(tm->tm_isdst > 0)];
#else # endif
#error USE_POSIX_TIME is defined but neither HAVE_TM_ZONE or HAVE_INT_TIMEZONE are defined
#endif
#else /* !USE_POSIX_TIME */ #else /* not (HAVE_TM_ZONE || HAVE_INT_TIMEZONE) */
*tzp = CTimeZone; /* V7 conventions; don't know timezone? */ *tzp = CTimeZone; /* V7 conventions; don't know timezone? */
if (tzn != NULL) if (tzn != NULL)
*tzn = CTZName; *tzn = CTZName;
...@@ -1629,7 +1623,7 @@ timestamp_trunc(PG_FUNCTION_ARGS) ...@@ -1629,7 +1623,7 @@ timestamp_trunc(PG_FUNCTION_ARGS)
if (IS_VALID_UTIME(tm->tm_year, tm->tm_mon, tm->tm_mday)) 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_isdst = -1;
tm->tm_year -= 1900; tm->tm_year -= 1900;
tm->tm_mon -= 1; tm->tm_mon -= 1;
...@@ -1638,21 +1632,19 @@ timestamp_trunc(PG_FUNCTION_ARGS) ...@@ -1638,21 +1632,19 @@ timestamp_trunc(PG_FUNCTION_ARGS)
tm->tm_year += 1900; tm->tm_year += 1900;
tm->tm_mon += 1; tm->tm_mon += 1;
#if defined(HAVE_TM_ZONE) # if defined(HAVE_TM_ZONE)
tz = -(tm->tm_gmtoff); /* tm_gmtoff is Sun/DEC-ism */ 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); tz = (tm->tm_isdst ? (_timezone - 3600) : _timezone);
#else # else
tz = (tm->tm_isdst ? (timezone - 3600) : timezone); tz = (tm->tm_isdst ? (timezone - 3600) : timezone);
#endif # endif
#else # endif
#error USE_POSIX_TIME is defined but neither HAVE_TM_ZONE or HAVE_INT_TIMEZONE are defined
#endif
#else /* !USE_POSIX_TIME */ #else /* not (HAVE_TM_ZONE || HAVE_INT_TIMEZONE) */
tz = CTimeZone; tz = CTimeZone;
#endif #endif
} }
......
#define USE_POSIX_TIME
#define CLASS_CONFLICT #define CLASS_CONFLICT
#define DISABLE_XOPEN_NLS #define DISABLE_XOPEN_NLS
#define HAS_TEST_AND_SET #define HAS_TEST_AND_SET
......
#include <kernel/OS.h> #include <kernel/OS.h>
#include "kernel/image.h" #include "kernel/image.h"
#define USE_POSIX_TIME
#define HAS_TEST_AND_SET #define HAS_TEST_AND_SET
typedef unsigned char slock_t; typedef unsigned char slock_t;
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#define NEED_SPARC_TAS_ASM #define NEED_SPARC_TAS_ASM
#endif #endif
#define USE_POSIX_TIME
#define HAS_TEST_AND_SET #define HAS_TEST_AND_SET
typedef unsigned char slock_t; typedef unsigned char slock_t;
#define USE_POSIX_TIME
#ifndef BIG_ENDIAN #ifndef BIG_ENDIAN
#define BIG_ENDIAN 4321 #define BIG_ENDIAN 4321
#endif #endif
......
#define USE_POSIX_TIME
#if defined(__i386__) #if defined(__i386__)
#define NEED_I386_TAS_ASM #define NEED_I386_TAS_ASM
#define HAS_TEST_AND_SET #define HAS_TEST_AND_SET
......
#define USE_POSIX_TIME
#define HAS_TEST_AND_SET #define HAS_TEST_AND_SET
typedef struct typedef struct
{ {
......
#define USE_POSIX_TIME
#define HAS_TEST_AND_SET #define HAS_TEST_AND_SET
typedef unsigned long slock_t; typedef unsigned long slock_t;
/* __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__) #if defined(__i386__)
typedef unsigned char slock_t; typedef unsigned char slock_t;
...@@ -42,13 +34,3 @@ typedef unsigned int slock_t; ...@@ -42,13 +34,3 @@ typedef unsigned int slock_t;
#define HAS_TEST_AND_SET #define HAS_TEST_AND_SET
#endif #endif
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
#ifdef HAVE_INT_TIMEZONE
#undef HAVE_INT_TIMEZONE
#endif
#endif
#if defined(__powerpc__)
#undef HAVE_INT_TIMEZONE
#endif
#define USE_POSIX_TIME
#if defined(__i386__) #if defined(__i386__)
#define NEED_I386_TAS_ASM #define NEED_I386_TAS_ASM
#define HAS_TEST_AND_SET #define HAS_TEST_AND_SET
......
#define USE_POSIX_TIME
#if defined(__i386__) #if defined(__i386__)
#define NEED_I386_TAS_ASM #define NEED_I386_TAS_ASM
#define HAS_TEST_AND_SET #define HAS_TEST_AND_SET
......
#define NOFIXADE #define NOFIXADE
#define USE_POSIX_TIME
#define DISABLE_XOPEN_NLS #define DISABLE_XOPEN_NLS
#define HAS_TEST_AND_SET #define HAS_TEST_AND_SET
/*#include <sys/mman.h>*/ /* for msemaphore */ /*#include <sys/mman.h>*/ /* for msemaphore */
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include <semaphore.h> /* for sem_t */ #include <semaphore.h> /* for sem_t */
#endif #endif
#define USE_POSIX_TIME
#define HAS_TEST_AND_SET #define HAS_TEST_AND_SET
#define HAVE_STRING_H #define HAVE_STRING_H
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
#define DISABLE_COMPLEX_MACRO #define DISABLE_COMPLEX_MACRO
#define USE_POSIX_TIME
#define HAS_TEST_AND_SET #define HAS_TEST_AND_SET
#define NEED_I386_TAS_ASM #define NEED_I386_TAS_ASM
......
/* $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 #define HAS_TEST_AND_SET
typedef unsigned char slock_t; typedef unsigned char slock_t;
......
#define USE_POSIX_TIME
#define HAS_TEST_AND_SET #define HAS_TEST_AND_SET
typedef unsigned char slock_t; typedef unsigned char slock_t;
......
#define USE_POSIX_TIME
#ifndef BYTE_ORDER #ifndef BYTE_ORDER
#ifdef MIPSEB #ifdef MIPSEB
#define BYTE_ORDER BIG_ENDIAN #define BYTE_ORDER BIG_ENDIAN
......
#define NOFIXADE #define NOFIXADE
#define USE_POSIX_TIME
#define NEED_STRDUP #define NEED_STRDUP
#ifndef BIG_ENDIAN #ifndef BIG_ENDIAN
......
#define USE_POSIX_TIME
#define HAS_TEST_AND_SET #define HAS_TEST_AND_SET
#define NEED_I386_TAS_ASM #define NEED_I386_TAS_ASM
......
#define USE_POSIX_TIME
#define HAS_TEST_AND_SET #define HAS_TEST_AND_SET
#define NEED_I386_TAS_ASM #define NEED_I386_TAS_ASM
......
...@@ -6,7 +6,6 @@ typedef unsigned char slock_t; ...@@ -6,7 +6,6 @@ typedef unsigned char slock_t;
#endif #endif
#define tzname _tzname /* should be in time.h? */ #define tzname _tzname /* should be in time.h? */
#define USE_POSIX_TIME
#define HAVE_INT_TIMEZONE /* has int _timezone */ #define HAVE_INT_TIMEZONE /* has int _timezone */
#include <cygwin/version.h> #include <cygwin/version.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment