From ed9fff67f0aa4b3ca2704063d2a2bc28fd4aff5e Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 30 Nov 2024 15:21:51 +0900 Subject: [PATCH] Win32: Accept a symbolic name for `--with-ntver` option --- win32/configure.bat | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/win32/configure.bat b/win32/configure.bat index 44385c070e..f3d350f8df 100755 --- a/win32/configure.bat +++ b/win32/configure.bat @@ -178,7 +178,16 @@ goto :loop ; shift goto :loop ; :ntver - echo>> %config_make% NTVER = %~2 + ::- For version constants, see + ::- https://learn.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt#remarks + set NTVER=%~2 + if /i not "%NTVER:~0,2%" == "0x" if /i not "%NTVER:~0,13%" == "_WIN32_WINNT_" ( + for %%i in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do ( + call set NTVER=%%NTVER:%%i=%%i%% + ) + call set NTVER=_WIN32_WINNT_%%NTVER%% + ) + echo>> %config_make% NTVER = %NTVER% echo>>%confargs% %1=%2 \ shift shift @@ -266,6 +275,8 @@ goto :loop ; echo --with-opt-dir="DIR-LIST" add optional headers and libraries directories separated by `;' echo --disable-install-doc do not install rdoc indexes during install echo --with-ntver=0xXXXX target NT version (shouldn't use with old SDK) + echo --with-ntver=_WIN32_WINNT_XXXX + echo --with-ntver=XXXX same as --with-ntver=_WIN32_WINNT_XXXX echo Note that `,' and `;' need to be enclosed within double quotes in batch file command line. del %confargs% %config_make% goto :exit