diff options
| author | Eli Zaretskii | 2023-04-13 08:18:33 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2023-04-13 08:18:33 +0300 |
| commit | 864a4dc236395e441aafd23b9cbca099afdc5324 (patch) | |
| tree | c17dc74270059c0a07699955655054043385ed22 /src | |
| parent | a22eb9ae0f9bfb745d05ea5b069b59592f19f1eb (diff) | |
| download | emacs-864a4dc236395e441aafd23b9cbca099afdc5324.tar.gz emacs-864a4dc236395e441aafd23b9cbca099afdc5324.zip | |
Fix compilation of w32.c with old MinGW system headers
* src/w32.c (CONSOLE_FONT_INFO): Make sure the definition is not
visible for MinGW versions whose w32api's version is before 5.2.0.
(Bug#52792)
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32.c | 9 |
1 files changed, 8 insertions, 1 deletions
| @@ -543,7 +543,14 @@ typedef LANGID (WINAPI *GetUserDefaultUILanguage_Proc) (void); | |||
| 543 | 543 | ||
| 544 | typedef COORD (WINAPI *GetConsoleFontSize_Proc) (HANDLE, DWORD); | 544 | typedef COORD (WINAPI *GetConsoleFontSize_Proc) (HANDLE, DWORD); |
| 545 | 545 | ||
| 546 | #if _WIN32_WINNT < 0x0501 | 546 | /* Old versions of mingw.org's MinGW, before v5.2.0, don't have a |
| 547 | _WIN32_WINNT guard for CONSOLE_FONT_INFO in wincon.h, and so don't | ||
| 548 | need the conditional definition below, which causes compilation | ||
| 549 | errors. Note: MinGW64 sets _WIN32_WINNT to a higher version, and | ||
| 550 | its w32api.h version stays fixed at 3.14. */ | ||
| 551 | #if _WIN32_WINNT < 0x0501 \ | ||
| 552 | && (__W32API_MAJOR_VERSION > 5 \ | ||
| 553 | || (__W32API_MAJOR_VERSION == 5 && __W32API_MINOR_VERSION >= 2)) | ||
| 547 | typedef struct | 554 | typedef struct |
| 548 | { | 555 | { |
| 549 | DWORD nFont; | 556 | DWORD nFont; |