diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Make_mvc.mak | 2 | ||||
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/version.h | 17 |
3 files changed, 19 insertions, 2 deletions
diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak index e05518610b..aec9efaf9a 100644 --- a/src/Make_mvc.mak +++ b/src/Make_mvc.mak @@ -187,7 +187,7 @@ MINOR= 1 !ENDIF !IF ![$(PS) $(PSFLAGS) try{Out-File -FilePath '.\patchlvl.tmp' -InputObject \ - \"PATCHLEVEL=$$(((Get-Content -Path '.\version.c' \ + \"PATCHLEVEL=$$([decimal^]((Get-Content -Path '.\version.c' \ -TotalCount ((Select-String -Pattern 'static int included_patches' \ -Path '.\version.c').LineNumber+3))[-1^]).Trim().TrimEnd(','))\"} \ catch{exit 1}] diff --git a/src/version.c b/src/version.c index fc3969164a..feed8385e5 100644 --- a/src/version.c +++ b/src/version.c @@ -705,6 +705,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 368, +/**/ 367, /**/ 366, 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 |