diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-11-30 15:21:51 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-11-30 15:21:51 +0900 |
| commit | ed9fff67f0aa4b3ca2704063d2a2bc28fd4aff5e (patch) | |
| tree | 9a7edb8d0fbb2ad1a74069ee192d9268785d03cf | |
| parent | 4745338a3f336d7bedb02895534721661551ebb9 (diff) | |
Win32: Accept a symbolic name for `--with-ntver` option
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12224
| -rwxr-xr-x | win32/configure.bat | 13 |
1 files changed, 12 insertions, 1 deletions
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
|
