Subject: Re: bug#9960: Compiling Emacs trunk with MSVC

From: Christoph Scholtes <[email-masked]>
Date: Sat, 05 Nov 2011 19:50:01 -0600

Christoph Scholtes <[email-masked]> writes:

>> Make this (from src/s/ms-w32.h):
>>
>>   #if !defined (_MSC_VER) || (_MSC_VER < 1400)
>>   #define tzname    _tzname
>>
>> be defined unconditionally.  (But leave the "utime" part under the
>> same condition it is today.)
>
> This is a problem. The ensuing error is:
>
> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\time.h(281) : erro
> r C2090: function returns array
>
> From time.h:
> _CRT_INSECURE_DEPRECATE_GLOBALS(_get_tzname) _CRTIMP extern char * tzname[2];

I found this old thread dealing with MSVC problems:
http://old.nabble.com/Compilation-problems-with-latest-MSVC-td8040440.html

I undef'ed HAVE_TZNAME and it linked, but then crashed when dumping with
the following error:

Dumping from obj/i386/temacs.bin
          to obj/i386/temacs.exe
        "D:\devel\emacs\emacs-bzr\trunk_jenkins\src/obj/i386/temacs.exe" -batch
-l loadup dump
NMAKE : fatal error U1077: 'D:\devel\emacs\emacs-bzr\trunk_jenkins\src/obj/i386/
temacs.exe' : return code '0xc0000135'
Stop.