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: Christoph Scholtes <cschol2112 <at> googlemail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 9960 <at> debbugs.gnu.org
Subject: bug#9960: Compiling Emacs trunk with MSVC
Date: Sat, 05 Nov 2011 16:23:40 -0600
Eli Zaretskii <eliz <at> gnu.org> writes:

> That comes from Fabrice, assuming that removing `static' doesn't help.

No, it does not.

> Does it fail even if you take (1 << 3) in one more level of
> parentheses?

Yes.

> What about an intermediate macro, as in
>
>  #define FOO (1 << GCTYPEBITS)
>  static int __declspec(align(FOO)) test = 1;
>
> ?

Not working. I tried all of these cases in my simple example. It does
seem to like the shift operator.

>> Other errors are due to missing definitions in stdint.h. The following
>> patch fixes this (64bit support added for completeness):
>
> Thanks, please install this.

I will. Thanks.

> Does this go away if you add "#define snprintf _snprintf" to
> src/s/ms-w32.h, for MSVC only?

Yes.

> These are because xdisp.c defines window_box_right `inline'.  (This is
> an optimized build, right? if not, does it mean that MSVC inlines
> functions even for a non-optimized builds?)  I would suggest to make
> that `inline' conditional on _MSC_VER being undefined.

That worked.

> Add "#define strtoimax _strtoi64" to src/s/ms-w32.h, conditioned on
> _MSC_VER.

Worked.

> 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];




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.