Commit 868628e4 authored by Robert Haas's avatar Robert Haas

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
parent bd0f206f
...@@ -214,12 +214,12 @@ extern int pgkill(int pid, int sig); ...@@ -214,12 +214,12 @@ extern int pgkill(int pid, int sig);
extern int pclose_check(FILE *stream); extern int pclose_check(FILE *stream);
/* Global variable holding time zone information. */ /* Global variable holding time zone information. */
#ifndef __CYGWIN__ #if defined(WIN32) || defined(__CYGWIN__)
#define TIMEZONE_GLOBAL timezone
#define TZNAME_GLOBAL tzname
#else
#define TIMEZONE_GLOBAL _timezone #define TIMEZONE_GLOBAL _timezone
#define TZNAME_GLOBAL _tzname #define TZNAME_GLOBAL _tzname
#else
#define TIMEZONE_GLOBAL timezone
#define TZNAME_GLOBAL tzname
#endif #endif
#if defined(WIN32) || defined(__CYGWIN__) #if defined(WIN32) || defined(__CYGWIN__)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment