To: vim_dev@googlegroups.com Subject: Patch 8.1.0947 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.0947 Problem: Using MSWIN before it is defined. (Cesar Romani) Solution: Move the block that uses MSWIN to below including vim.h. (Ken Takata) Files: src/if_ruby.c *** ../vim-8.1.0946/src/if_ruby.c 2019-02-17 17:44:36.211875510 +0100 --- src/if_ruby.c 2019-02-18 20:39:17.771644504 +0100 *************** *** 64,86 **** # define RUBY_EXPORT # endif ! #if !defined(MSWIN) ! # include ! # define HINSTANCE void* ! # define RUBY_PROC void* ! # define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL) ! # define symbol_from_dll dlsym ! # define close_dll dlclose ! #else ! # define RUBY_PROC FARPROC ! # define load_dll vimLoadLib ! # define symbol_from_dll GetProcAddress ! # define close_dll FreeLibrary ! #endif ! ! #endif /* ifdef DYNAMIC_RUBY */ ! /* suggested by Ariya Mizutani */ #if (_MSC_VER == 1200) # undef _WIN32_WINNT #endif --- 64,72 ---- # define RUBY_EXPORT # endif ! #endif // ifdef DYNAMIC_RUBY ! // suggested by Ariya Mizutani #if (_MSC_VER == 1200) # undef _WIN32_WINNT #endif *************** *** 183,188 **** --- 169,190 ---- #include "vim.h" #include "version.h" + #ifdef DYNAMIC_RUBY + # if !defined(MSWIN) // must come after including vim.h, where it is defined + # include + # define HINSTANCE void* + # define RUBY_PROC void* + # define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL) + # define symbol_from_dll dlsym + # define close_dll dlclose + # else + # define RUBY_PROC FARPROC + # define load_dll vimLoadLib + # define symbol_from_dll GetProcAddress + # define close_dll FreeLibrary + # endif + #endif + #if defined(PROTO) && !defined(FEAT_RUBY) /* Define these to be able to generate the function prototypes. */ # define VALUE int *** ../vim-8.1.0946/src/version.c 2019-02-17 23:26:47.210170294 +0100 --- src/version.c 2019-02-18 20:41:21.910682697 +0100 *************** *** 781,782 **** --- 781,784 ---- { /* Add new patch number below this line */ + /**/ + 947, /**/ -- Git catch 22: "merge is not possible because you have unmerged files." /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///