summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0947
blob: c4ac472e88e85e5b4391caddc29f40f07bd3e5ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0947
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
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 <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 */
  #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 <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
*** ../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    ///