Skip to content

Commit 520711d

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 48c978f commit 520711d

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
@@ -255,12 +255,12 @@ extern int pgkill(int pid, int sig);
255255
extern int pclose_check(FILE *stream);
256256

257257
/* Global variable holding time zone information. */
258-
#ifndef __CYGWIN__
259-
#define TIMEZONE_GLOBAL timezone
260-
#define TZNAME_GLOBAL tzname
261-
#else
258+
#if defined(WIN32) || defined(__CYGWIN__)
262259
#define TIMEZONE_GLOBAL _timezone
263260
#define TZNAME_GLOBAL _tzname
261+
#else
262+
#define TIMEZONE_GLOBAL timezone
263+
#define TZNAME_GLOBAL tzname
264264
#endif
265265

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

0 commit comments

Comments
 (0)