Fix Windows.h case on Linux: use lowercase windows.h

On Linux (case-sensitive filesystem) MinGW-w64 installs the header as
windows.h (lowercase) while comm.h included <Windows.h> (capital W),
causing a fatal compile error when cross-compiling for Windows.

Changed to <windows.h> which works on both Linux/MinGW-w64 and native
Windows/MSVC (Windows header includes are case-insensitive on NTFS).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Uladzimir Karpenka 2026-06-02 12:43:45 +03:00
parent 90c906eb3a
commit a77dbbb6e5
2 changed files with 2 additions and 2 deletions

View File

@ -117,7 +117,7 @@ check-tools:
echo " Debian: sudo apt install mingw-w64"; \
echo " Fedora: sudo dnf install mingw64-gcc"; \
echo ""; exit 1; }
@echo '#include <windows.h>' | $(CC) -x c - -fsyntax-only 2>/dev/null || { \
@echo '#include <windows.h>' | $(CC) -x c - -fsyntax-only -Wno-pragma-once-outside-header 2>/dev/null || { \
echo ""; \
echo "ОШИБКА: Windows API заголовки не найдены."; \
echo "Установите пакет с заголовками MinGW-w64:"; \

2
comm.h
View File

@ -33,7 +33,7 @@ warren@wpratt.com
#endif
#ifdef _WIN32
#include <Windows.h>
#include <windows.h>
#include <process.h>
#include <intrin.h>
#endif