From: Eli Zaretskii Date: Sat, 24 Mar 2012 13:43:21 +0000 (+0200) Subject: Fix bug #9960 with MSVC build on MS-Windows. X-Git-Tag: emacs-pretest-24.0.05~62 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8a0c01dd25dabf60ace651c7acfa1a5e326458e8;p=emacs.git Fix bug #9960 with MSVC build on MS-Windows. src/s/ms-w32.h (tzname): Include time.h before redirecting to _tzname. Fixes the MSVC build. --- diff --git a/src/ChangeLog b/src/ChangeLog index 182493abe67..9a4d10d410e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-03-24 Eli Zaretskii + + * s/ms-w32.h (tzname): Include time.h before redirecting to + _tzname. Fixes the MSVC build. (Bug#9960) + 2012-03-24 Andreas Schwab * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6 diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h index d533ae34ac3..5eed3a177dc 100644 --- a/src/s/ms-w32.h +++ b/src/s/ms-w32.h @@ -286,6 +286,12 @@ typedef int pid_t; #define stricmp _stricmp #define tzset _tzset +/* Include time.h before redirecting tzname, since MSVC's time.h + defines _tzname to call a function, but also declares tzname a + 2-element array. Having the redirection before including the + header thus has the effect of declaring a function that returns an + array, and triggers an error message. */ +#include #define tzname _tzname #if !defined (_MSC_VER) || (_MSC_VER < 1400) #undef utime