Skip to content

Commit 86e2475

Browse files
tglsfdcadunstan
authored andcommitted
On all Windows platforms, not just Cygwin, use _timezone and _tzname.
Back-patch commit 868628e into the 9.5 branch, so that we can support building that branch with Visual Studio 2015. This patch itself could go further back, but other VS2015 patches such as 0fb54de and c8e81af were only back-patched to 9.5, so there seems little point in handling this one differently. Discussion: https://postgr.es/m/CAD=LzWFg+Z-KUS3Wm8-1J2vOuYErJXbjuE6b7quzswQEBXJWMQ@mail.gmail.com Now that we have backported VS2015 support to 9.4 and 9.3, backport this also.
1 parent 19acfd6 commit 86e2475

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/include/port.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,12 @@ extern int pgkill(int pid, int sig);
225225
extern int pclose_check(FILE *stream);
226226

227227
/* Global variable holding time zone information. */
228-
#ifndef __CYGWIN__
229-
#define TIMEZONE_GLOBAL timezone
230-
#define TZNAME_GLOBAL tzname
231-
#else
228+
#if defined(WIN32) || defined(__CYGWIN__)
232229
#define TIMEZONE_GLOBAL _timezone
233230
#define TZNAME_GLOBAL _tzname
231+
#else
232+
#define TIMEZONE_GLOBAL timezone
233+
#define TZNAME_GLOBAL tzname
234234
#endif
235235

236236
#if defined(WIN32) || defined(__CYGWIN__)

0 commit comments

Comments
 (0)