diff options
author | RestorerZ <restorer@mail2k.ru> | 2024-04-23 20:33:38 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-04-23 20:33:38 +0200 |
commit | dc5cd1cac1a8b25b6259f2b0a7a071f7b840e730 (patch) | |
tree | 51a4b539683f873836c89c03eae1d70dd835f2cd /src/version.h | |
parent | a16f251333e324c94ca8e3e92d1fcf3193dfa382 (diff) |
patch 9.1.0368: MS-Windows: Hard to define the Vim Patchlevel with leading zeroesv9.1.0368
Problem: MS-Windows: Hard to define the Vim Patchlevel with leading
zeroes for the installer
Solution: re-define VIM_VERSION_PATCHLEVEL_STR with leading zeroes,
interpret Patchlevel as decimal in Make_mvc.mak
(RestorerZ)
closes: #14471
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/version.h')
-rw-r--r-- | src/version.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/version.h b/src/version.h index b9c6d837fe..13f3bac9ff 100644 --- a/src/version.h +++ b/src/version.h @@ -31,7 +31,22 @@ #ifndef VIM_VERSION_PATCHLEVEL # define VIM_VERSION_PATCHLEVEL 0 #endif -#define VIM_VERSION_PATCHLEVEL_STR VIM_TOSTR(VIM_VERSION_PATCHLEVEL) + +// Patchlevel with leading zeros +// For compatibility with the installer from "vim-win32-installer" and WinGet. +// For details see https://github.com/vim/vim-win32-installer/pull/277 +// and https://github.com/vim/vim-win32-installer/pull/285 +#if VIM_VERSION_PATCHLEVEL < 10 +#define LEADZERO(x) 000 ## x +#elif VIM_VERSION_PATCHLEVEL < 100 +#define LEADZERO(x) 00 ## x +#elif VIM_VERSION_PATCHLEVEL < 1000 +#define LEADZERO(x) 0 ## x +#else +#define LEADZERO(x) x +#endif + +#define VIM_VERSION_PATCHLEVEL_STR VIM_TOSTR(LEADZERO(VIM_VERSION_PATCHLEVEL)) // Used by MacOS port; should be one of: development, alpha, beta, final #define VIM_VERSION_RELEASE final |