]> granicus.if.org Git - vim/commitdiff
patch 8.1.0947: using MSWIN before it is defined v8.1.0947
authorBram Moolenaar <Bram@vim.org>
Mon, 18 Feb 2019 19:42:50 +0000 (20:42 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 18 Feb 2019 19:42:50 +0000 (20:42 +0100)
Problem:    Using MSWIN before it is defined. (Cesar Romani)
Solution:   Move the block that uses MSWIN to below including vim.h. (Ken
            Takata)

src/if_ruby.c
src/version.c

index 85f94c4f09c40bd660636d24ebe01424ee69fb16..d3ed78128114e18b006786a928b555a3fe7ebefe 100644 (file)
 #  define RUBY_EXPORT
 # endif
 
-#if !defined(MSWIN)
-# 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
 
-#endif  /* ifdef DYNAMIC_RUBY */
-
-/* suggested by Ariya Mizutani */
+// suggested by Ariya Mizutani
 #if (_MSC_VER == 1200)
 # undef _WIN32_WINNT
 #endif
 #include "vim.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)
 /* Define these to be able to generate the function prototypes. */
 # define VALUE int
index ad062ae06b2973ff1db6a278c74c5accd438a7d5..269c01b0b399f8fd2b1eca36c6557190f793c85c 100644 (file)
@@ -779,6 +779,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    947,
 /**/
     946,
 /**/