Commit 5eb6de59 authored by Tom Lane's avatar Tom Lane

Remove NO_MKTIME_BEFORE_1970. I had speculated that it was not needed

anymore given the mktime() workaround now done in DetermineLocalTimeZone.
This has now been confirmed by Robert Bruccoleri for Irix, and I'm going
to extrapolate to AIX as well.
parent f9b5b41e
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.100 2002/10/04 17:34:01 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.101 2002/11/12 00:39:08 tgl Exp $
* *
* NOTES * NOTES
* *
...@@ -289,21 +289,9 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char **tzn) ...@@ -289,21 +289,9 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char **tzn)
#if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE) #if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE)
if ((!HasCTZSet) && (tzp != NULL)) if ((!HasCTZSet) && (tzp != NULL))
{
tx = localtime((time_t *) &time); tx = localtime((time_t *) &time);
#ifdef NO_MKTIME_BEFORE_1970
if (tx->tm_year < 70 && tx->tm_isdst == 1)
{
time -= 3600;
tx = localtime((time_t *) &time);
tx->tm_isdst = 0;
}
#endif
}
else else
{
tx = gmtime((time_t *) &time); tx = gmtime((time_t *) &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;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.74 2002/09/21 19:52:41 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.75 2002/11/12 00:39:08 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -906,14 +906,6 @@ timestamp2tm(Timestamp dt, int *tzp, struct tm * tm, fsec_t *fsec, char **tzn) ...@@ -906,14 +906,6 @@ timestamp2tm(Timestamp dt, int *tzp, struct tm * tm, fsec_t *fsec, char **tzn)
#if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE) #if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE)
tx = localtime(&utime); tx = localtime(&utime);
#ifdef NO_MKTIME_BEFORE_1970
if (tx->tm_year < 70 && tx->tm_isdst == 1)
{
utime -= 3600;
tx = localtime(&utime);
tx->tm_isdst = 0;
}
#endif
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;
tm->tm_mday = tx->tm_mday; tm->tm_mday = tx->tm_mday;
......
#define CLASS_CONFLICT #define CLASS_CONFLICT
#define DISABLE_XOPEN_NLS #define DISABLE_XOPEN_NLS
#define HAS_TEST_AND_SET #define HAS_TEST_AND_SET
#define NO_MKTIME_BEFORE_1970
typedef unsigned int slock_t; typedef unsigned int slock_t;
#include <sys/machine.h> /* ENDIAN definitions for network #include <sys/machine.h> /* ENDIAN definitions for network
......
#define HAS_TEST_AND_SET #define HAS_TEST_AND_SET
#define NO_MKTIME_BEFORE_1970
typedef unsigned long slock_t; typedef unsigned long slock_t;
abstime/alpha.*-dec-osf=abstime-solaris-1947 abstime/alpha.*-dec-osf=abstime-solaris-1947
abstime/.*-irix=abstime-solaris-1947
abstime/i.86-pc-solaris=abstime-solaris-1947 abstime/i.86-pc-solaris=abstime-solaris-1947
abstime/sparc-sun-solaris=abstime-solaris-1947 abstime/sparc-sun-solaris=abstime-solaris-1947
abstime/.*-sco=abstime-solaris-1947 abstime/.*-sco=abstime-solaris-1947
...@@ -21,10 +22,10 @@ geometry/hppa.*-hpux10=geometry-positive-zeros ...@@ -21,10 +22,10 @@ geometry/hppa.*-hpux10=geometry-positive-zeros
geometry/.*-irix6=geometry-positive-zeros geometry/.*-irix6=geometry-positive-zeros
horology/.*-aix4=horology-no-DST-before-1970 horology/.*-aix4=horology-no-DST-before-1970
horology/.*-aix5=horology-no-DST-before-1970 horology/.*-aix5=horology-no-DST-before-1970
horology/.*-irix6=horology-no-DST-before-1970
horology/alpha.*-dec-osf=horology-solaris-1947 horology/alpha.*-dec-osf=horology-solaris-1947
horology/.*-cygwin=horology-no-DST-before-1970 horology/.*-cygwin=horology-no-DST-before-1970
horology/hppa=horology-no-DST-before-1970 horology/hppa=horology-no-DST-before-1970
horology/.*-irix=horology-solaris-1947
horology/i.86-pc-solaris=horology-solaris-1947 horology/i.86-pc-solaris=horology-solaris-1947
horology/sparc-sun-solaris=horology-solaris-1947 horology/sparc-sun-solaris=horology-solaris-1947
horology/sparc-sun-sunos4.*=horology-no-DST-before-1970 horology/sparc-sun-sunos4.*=horology-no-DST-before-1970
...@@ -32,6 +33,7 @@ horology/.*-sysv5=horology-solaris-1947 ...@@ -32,6 +33,7 @@ horology/.*-sysv5=horology-solaris-1947
horology/.*-sco=horology-solaris-1947 horology/.*-sco=horology-solaris-1947
int8/.*-qnx=int8-exp-three-digits int8/.*-qnx=int8-exp-three-digits
tinterval/alpha.*-dec-osf=tinterval-solaris-1947 tinterval/alpha.*-dec-osf=tinterval-solaris-1947
tinterval/.*-irix=tinterval-solaris-1947
tinterval/i.86-pc-solaris=tinterval-solaris-1947 tinterval/i.86-pc-solaris=tinterval-solaris-1947
tinterval/sparc-sun-solaris=tinterval-solaris-1947 tinterval/sparc-sun-solaris=tinterval-solaris-1947
tinterval/.*-sysv5=tinterval-solaris-1947 tinterval/.*-sysv5=tinterval-solaris-1947
......
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