Skip site navigation (1) Skip section navigation (2)

timezone vs _timezone on Windows

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org, pgsql-hackers-win32(at)postgreSQL(dot)org
Subject: timezone vs _timezone on Windows
Date: 2004-09-01 15:33:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-hackers-win32
I think I see the real issue behind the recent argument about the
datatype of the timezone variable.  I don't think the datatype matters,
but the name certainly does.  In pgtz.c we have

	return tm->tm_gmtoff;
#elif defined(HAVE_INT_TIMEZONE)
	return -_timezone;
	return -timezone;
#error No way to determine TZ? Can this happen?

but the symbol HAVE_UNDERSCORE_TIMEZONE appears nowhere else ---
certainly it's not set by configure, and never has been.  So the
"_timezone" case is dead code at the moment.

In 7.4, pg_config_manual.h contained

 * Define this if your operating system has _timezone rather than timezone
#if defined(__CYGWIN__) || defined(WIN32)
#define HAVE_INT_TIMEZONE		/* has int _timezone */

but this passage has disappeared from CVS tip.  So given a platform that
has "_timezone" but not "timezone", CVS tip is broken.

I am wondering how changing this would affect the existing, allegedly
working Windows port.  Should we put back the pg_config_manual.h entry?
Should we restrict it to __CYGWIN__ only?

			regards, tom lane


pgsql-hackers by date

Next:From: Hannu KrosingDate: 2004-09-01 15:34:32
Subject: Re: version upgrade
Previous:From: G u i d o B a r o s i oDate: 2004-09-01 15:07:39
Subject: Re: slower every day

pgsql-hackers-win32 by date

Next:From: Vidyasagara GuntakaDate: 2004-09-01 18:15:09
Subject: Linking Win32 applications with libpq
Previous:From: Philip WarnerDate: 2004-09-01 12:52:12
Subject: Re: open item: tablespace handing in

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group