Hi, 2020/5/18 Mon 9:37:10 UTC+9 Michael Soyka wrote: > > Vim developers, > > When I try to build gvim on Wiindows XP using mingw with FEATURES=SMALL, I > get "windowsVersion undeclared" on line 839 of file os_win32.c. This > variable is instantiated in globals.h but only if FEAT_EVAL is defined and > this happens only for NORMAL builds. > > The compilation error goes away and the test suite passes if the > "windowsVersion" variable is moved out of the ifdef-block but I'm not > experienced enough to know if that is the right thing to do so I defer to > others for a patch. > > - mike >
"windowsVersion" is used only in the windowsversion() function. So, I think that the attached patch is better. Regards, Ken Takata -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/4759046f-813e-4b8e-bdb0-90f1245be026%40googlegroups.com.
diff --git a/src/os_win32.c b/src/os_win32.c --- a/src/os_win32.c +++ b/src/os_win32.c @@ -815,8 +815,10 @@ PlatformId(void) ovi.dwOSVersionInfoSize = sizeof(ovi); GetVersionEx(&ovi); +#ifdef FEAT_EVAL vim_snprintf(windowsVersion, sizeof(windowsVersion), "%d.%d", (int)ovi.dwMajorVersion, (int)ovi.dwMinorVersion); +#endif if ((ovi.dwMajorVersion == 6 && ovi.dwMinorVersion >= 2) || ovi.dwMajorVersion > 6)