From bee19c22d569e54513a9c591441c7f411811dc81 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 04:10:58 +0200 Subject: Adding upstream version 2:9.1.0374. Signed-off-by: Daniel Baumann --- src/version.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/version.h') diff --git a/src/version.h b/src/version.h index b9c6d83..13f3bac 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 -- cgit v1.2.3