bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#62792: Emacs 29.0.90 build fails


From: Tak Ota
Subject: bug#62792: Emacs 29.0.90 build fails
Date: Wed, 12 Apr 2023 12:54:45 -0700

Yes, this patch averts the error.  Thank you.

-Tak

On Wed, Apr 12, 2023 at 11:57 AM Eli Zaretskii <eliz@gnu.org> wrote:
> From: Tak Ota <takaaki.ota@gmail.com>
> Date: Wed, 12 Apr 2023 11:45:58 -0700
> Cc: 62792@debbugs.gnu.org
>
> #define __MINGW32_VERSION           3022004L
> #define __MINGW32_MAJOR_VERSION           3
> #define __MINGW32_MINOR_VERSION          22
> #define __MINGW32_PATCHLEVEL              4

OK, thanks.  I think I see the reason now.  Please try the patch below
and tell if it solves the problem.

diff --git a/src/w32.c b/src/w32.c
index 8d344d2..bb3b35f 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -543,7 +543,13 @@ int (WINAPI *pWideCharToMultiByte)(UINT,DWORD,LPCWSTR,int,LPSTR,int,LPCSTR,LPBOO

 typedef COORD (WINAPI *GetConsoleFontSize_Proc) (HANDLE, DWORD);

-#if _WIN32_WINNT < 0x0501
+/* Old versions of mingw.org's MinGW, before v5.2.0, don't have a
+   _WIN32_WINNT guard for CONSOLE_FONT_INFO in wincon.h, which causes
+   compilation errors.  Note: MinGW64 sets _WIN32_WINNT to a higher
+   version, and its w32api.h version stays fixed at 3.14.  */
+#if _WIN32_WINNT < 0x0501 \
+    && (__W32API_MAJOR_VERSION > 5 \
+       || (__W32API_MAJOR_VERSION == 5 && __W32API_MINOR_VERSION >= 2))
 typedef struct
 {
   DWORD nFont;

reply via email to

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