summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2018-05-01 16:02:41 +0000
committerAndrew Dunstan2018-09-12 16:24:11 +0000
commit86e247583310dc4a47cb7ba82201ff0b3c4d79d0 (patch)
treecfbba37e56ae5892864cc0e733d74431d2afcbf0
parent19acfd6528bcbf55ad996397177a1f2a16001c25 (diff)
On all Windows platforms, not just Cygwin, use _timezone and _tzname.
Back-patch commit 868628e4f 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 0fb54de9a and c8e81afc6 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.
-rw-r--r--src/include/port.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/include/port.h b/src/include/port.h
index 86941f7ddd7..74149f3709c 100644
--- a/src/include/port.h
+++ b/src/include/port.h
@@ -225,12 +225,12 @@ extern int pgkill(int pid, int sig);
extern int pclose_check(FILE *stream);
/* Global variable holding time zone information. */
-#ifndef __CYGWIN__
-#define TIMEZONE_GLOBAL timezone
-#define TZNAME_GLOBAL tzname
-#else
+#if defined(WIN32) || defined(__CYGWIN__)
#define TIMEZONE_GLOBAL _timezone
#define TZNAME_GLOBAL _tzname
+#else
+#define TIMEZONE_GLOBAL timezone
+#define TZNAME_GLOBAL tzname
#endif
#if defined(WIN32) || defined(__CYGWIN__)