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

Previous Next

Packages: w32, emacs;

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


Message #14 received at 9960 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Christoph Scholtes <cschol2112 <at> googlemail.com>
Cc: fabrice.popineau <at> supelec.fr, 9960 <at> debbugs.gnu.org
Subject: Re: bug#9960: Compiling Emacs trunk with MSVC
Date: Sat, 05 Nov 2011 15:22:52 +0200
> Date: Sat, 05 Nov 2011 06:54:39 -0600
> From: Christoph Scholtes <cschol2112 <at> googlemail.com>
> CC: fabrice.popineau <at> supelec.fr, 9960 <at> debbugs.gnu.org
> 
> I tried building with Visual Studio 2008 (Express Edition) and the build 
> fails:
> 
>          cl -I. -nologo -D_X86_=1 -c -Zl -Zp8 -W2 -Od -Gd -Zi 
> -DEMACSDEBUG -DENA
> BLE_CHECKING -DXASSERTS -I"D:/devel/emacs/libs/libXpm-3.5.8/include" 
> -I"D:/devel
> /emacs/libs/libXpm-3.5.8/src" 
> -I"D:/devel/emacs/libs/libpng-dev_1.4.3-1/include"
>   -I"D:/devel/emacs/libs/zlib-dev_1.2.5-2/include" 
> -I"D:/devel/emacs/libs/giflib-
> 4.1.4-1/include" -I"D:/devel/emacs/libs/jpeg-6b-4/include" 
> -I"D:/devel/emacs/lib
> s/tiff-3.8.2-1/include" -I"D:/devel/emacs/libs/gnutls-2.10.1/include" 
> -DHAVE_CON
> FIG_H=1 -I. -I../nt/inc -I../src -Foobj/i386\ md5.c sha1.c sha256.c 
> sha512.c fil
> emode.c
> md5.c
> md5.c(259) : warning C4116: unnamed type definition in parentheses
> sha1.c
> sha1.c(74) : error C2054: expected '(' to follow 'inline'
> sha1.c(75) : error C2085: 'set_uint32' : not in formal parameter list
> sha1.c(75) : error C2143: syntax error : missing ';' before '{'
> sha1.c(246) : warning C4116: unnamed type definition in parentheses
> sha256.c
> sha256.c(93) : error C2054: expected '(' to follow 'inline'
> sha256.c(94) : error C2085: 'set_uint32' : not in formal parameter list
> sha256.c(94) : error C2143: syntax error : missing ';' before '{'
> sha256.c(378) : warning C4116: unnamed type definition in parentheses
> 
> [...] (more errors after this)
> 
> This is caused by `inline' keyword, which should be `__inline' for MSVC. 
> I don't see any place where this would be defined for the W32 build. Am 
> I missing something?

Does this patch give good results?

=== modified file 'nt/config.nt'
--- nt/config.nt	2011-10-31 02:25:01 +0000
+++ nt/config.nt	2011-11-05 13:21:58 +0000
@@ -328,9 +328,13 @@ along with GNU Emacs.  If not, see <http
 
 /* Define to `__inline__' or `__inline' if that's what the C compiler
    calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifdef __GNUC__
 #ifndef __cplusplus
 #undef inline
 #endif
+#else  /* MSVC */
+#define inline __inline
+#endif
 
 /* Define to the equivalent of the C99 'restrict' keyword, or to
    nothing if this is not supported.  Do not define if restrict is





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.