Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 868628e

Browse files
committed
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
1 parent bd0f206 commit 868628e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/include/port.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,12 @@ extern int pgkill(int pid, int sig);
214214
extern int pclose_check(FILE *stream);
215215

216216
/* Global variable holding time zone information. */
217-
#ifndef __CYGWIN__
218-
#define TIMEZONE_GLOBAL timezone
219-
#define TZNAME_GLOBAL tzname
220-
#else
217+
#if defined(WIN32) || defined(__CYGWIN__)
221218
#define TIMEZONE_GLOBAL _timezone
222219
#define TZNAME_GLOBAL _tzname
220+
#else
221+
#define TIMEZONE_GLOBAL timezone
222+
#define TZNAME_GLOBAL tzname
223223
#endif
224224

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

0 commit comments

Comments
 (0)