0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.1.0947: using MSWIN before it is defined

Problem:    Using MSWIN before it is defined. (Cesar Romani)
Solution:   Move the block that uses MSWIN to below including vim.h. (Ken
            Takata)
This commit is contained in:
Bram Moolenaar
2019-02-18 20:42:50 +01:00
parent c854898881
commit 7dca2ebbcf
2 changed files with 20 additions and 16 deletions

View File

@@ -64,23 +64,9 @@
# define RUBY_EXPORT # define RUBY_EXPORT
# endif # endif
#if !defined(MSWIN) #endif // ifdef DYNAMIC_RUBY
# include <dlfcn.h>
# 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
/* suggested by Ariya Mizutani */
#if (_MSC_VER == 1200) #if (_MSC_VER == 1200)
# undef _WIN32_WINNT # undef _WIN32_WINNT
#endif #endif
@@ -183,6 +169,22 @@
#include "vim.h" #include "vim.h"
#include "version.h" #include "version.h"
#ifdef DYNAMIC_RUBY
# if !defined(MSWIN) // must come after including vim.h, where it is defined
# include <dlfcn.h>
# 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) #if defined(PROTO) && !defined(FEAT_RUBY)
/* Define these to be able to generate the function prototypes. */ /* Define these to be able to generate the function prototypes. */
# define VALUE int # define VALUE int

View File

@@ -779,6 +779,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
947,
/**/ /**/
946, 946,
/**/ /**/