emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Build failure on Windows using MSVC


From: Eli Zaretskii
Subject: Re: Build failure on Windows using MSVC
Date: Fri, 15 Aug 2008 12:31:13 +0300

> Date: Fri, 15 Aug 2008 13:19:37 +0530 (IST)
> From: dhruva <address@hidden>
> 
>  Build of Emacs from HEAD on WXP using MSVC 2003 fails due to redefinition of 
> a structure MEMORYSTATUSEX. The following patch fixes the issue on WXP (W2K 
> prof and upwards as that structure is available on W2K+). Need to test on 
> older versions and I have no access to it.

What is the exact error message emitted by Studio 2003?  Is there
perhaps a compiler switch to avoid such an error?  Is our definition
incompatible with what VS 2003 defines?

I need the above information to come up with a suitable solution that
will work with all supported platforms and compiler versions.  Someone
else compiled this CVS code with VS 6 and didn't have this problem, so
we need to find a solution that doesn't break versions of VS other
than yours.

> === modified file 'src/w32.c'
> --- src/w32.c   2008-08-10 01:05:02 +0000
> +++ src/w32..c   2008-08-15 07:43:51 +0000
> @@ -73,6 +73,7 @@
>  #define _ANONYMOUS_STRUCT
>  #endif
>  #include <windows.h>
> +#if (WINVER<0x0500)

I don't want to use WINVER.  It's an old and deprecated macro, and we
already use its more modern replacement _WIN32_WINNT.  Also, the
availability of the function at run time is not an issue here, since
the code dynamically tests that and only uses the function if it's
available.  The issue is compilation.

>From your report, I understand that the MS header files do not guard
the declaration of MEMORYSTATUSEX with _WIN32_WINNT, like the MinGW
headers do?  Can you verify that, please?

If this is so, I prefer to condition the declaration on __MINGW32__
rather than use WINVER.  The only thing that bothers me is VS 6 (see
above).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]