GNU bug report logs - #9960
Compiling Emacs trunk with MSVC

Previous Next

Packages: emacs, w32;

Reported by: Eli Zaretskii <eliz <at> gnu.org>

Date: Sat, 5 Nov 2011 11:24:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Tim Crews <tim.crews <at> code-affinity.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 9960 <at> debbugs.gnu.org
Subject: bug#9960: Compiling Emacs trunk with MSVC
Date: Wed, 30 Nov 2011 12:42:08 -0700
On 11/30/2011 12:17 PM, Eli Zaretskii wrote:
>> Date: Wed, 30 Nov 2011 11:22:05 -0700
>> From: Tim Crews<tim.crews <at> code-affinity.com>
>> Cc: 9960 <at> debbugs.gnu.org
>>
>>> If you tried a 64-bit build, then it is not yet supported on Windows.
>>> Try the 32-bit build, it should work.
>>
>> I was doing a 32-bit build.  There are still a few minor changes from
>> Fabrice Popineau that haven't made it into bzr yet.
>> (http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9960#224)   With those
>> changes, the build succeeds.
>
> Which changes, specifically, are needed?  I know only about one issue:
> the one with _tzname.  The rest, to the best of my knowledge, are for
> a 64-bit build.  If I'm wrong, I'd like to know which other changes
> are still needed for the 32-bit build with MSVC.
>
>> I built from the latest bzr source and can confirm that the linum-mode
>> crash no longer occurs on my end.
>
> Thanks.

There are only two changes listed in but 9960 message 224, both related 
to _tzname.  (The patch is repeated for reference at the bottom of this 
message.)  The changes are to lib/strftime.c and src/s/ms-w32.h.

If I back out Fabrice's proposed change to lib/strftime.c, the build 
succeeds through the compilation phase but fails to link because of 
unresolved external _tzname.

If I back out Fabrice's proposed change to src/s/ms-w32.h, compilation 
of ntlib.c fails with "time.h(270) : error C2090: function returns array".

So it appears that both changes are needed for the MSVC 32-bit build.

Tim Crews


=== modified file 'lib/strftime.c'
--- lib/strftime.c      2011-03-31 04:24:03 +0000
+++ lib/strftime.c      2011-11-28 15:38:55 +0000
@@ -36,9 +36,13 @@
 #include <ctype.h>
 #include <time.h>

+#ifdef _MSC_VER
+#define tzname _tzname
+#else
 #if HAVE_TZNAME && !HAVE_DECL_TZNAME
 extern char *tzname[];
 #endif
+#endif

 /* Do multibyte processing if multibytes are supported, unless
    multibyte sequences are safe in formats.  Multibyte sequences are
=== modified file 'src/s/ms-w32.h'
--- src/s/ms-w32.h      2011-11-27 18:52:53 +0000
+++ src/s/ms-w32.h      2011-11-28 15:33:33 +0000
@@ -286,7 +286,9 @@
 #define stricmp   _stricmp
 #define tzset     _tzset

+#ifndef _MSC_VER
 #define tzname    _tzname
+#endif
 #if !defined (_MSC_VER) || (_MSC_VER < 1400)
 #undef  utime
 #define utime    _utime





This bug report was last modified 13 years and 61 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.