From 868628e4fd44d75987d6c099ac63613cc5417629 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Mon, 28 Mar 2016 20:59:25 -0400 Subject: [PATCH] On all Windows platforms, not just Cygwin, use _timezone and _tzname. Up until now, we've been using timezone and tzname, but Visual Studio 2015 (for which we wish to add support) no longer declares those symbols. All versions since Visual Studio 2003 apparently support the underscore-equipped names, and we don't support anything older than Visual Studio 2005, so this should work OK everywhere. But let's see what the buildfarm thinks. Michael Paquier, reviewed by Petr Jelinek --- src/include/port.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/include/port.h b/src/include/port.h index cb13dd80c7..455f72338c 100644 --- a/src/include/port.h +++ b/src/include/port.h @@ -214,12 +214,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__)