diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-01-15 16:59:07 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-01-15 16:59:07 +0100 |
commit | 4f391796b7de78a434a2cc7107034603df414905 (patch) | |
tree | 3f51e86d2e282d5cefc5113e2e34769d5a881f75 /src | |
parent | 810f9c361c83afb36b9f1cdadca2b93f1201d039 (diff) |
patch 8.0.0191: can't build with Ruby on some systemsv8.0.0191
Problem: Some systems do not have ruby_sysinit(), causing the build to
fail.
Solution: Clean up how ruby_sysinit() and NtInitialize() are used. (Taro
Muraoka)
Diffstat (limited to 'src')
-rw-r--r-- | src/if_ruby.c | 8 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/if_ruby.c b/src/if_ruby.c index 509d2f6cf1..afa27abe2c 100644 --- a/src/if_ruby.c +++ b/src/if_ruby.c @@ -303,6 +303,7 @@ static void ruby_vim_init(void); # define ruby_init_loadpath dll_ruby_init_loadpath # ifdef WIN3264 # define NtInitialize dll_NtInitialize +# define ruby_sysinit dll_ruby_sysinit # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 # define rb_w32_snprintf dll_rb_w32_snprintf # endif @@ -405,6 +406,7 @@ static void (*dll_ruby_init) (void); static void (*dll_ruby_init_loadpath) (void); # ifdef WIN3264 static void (*dll_NtInitialize) (int*, char***); +static void (*dll_ruby_sysinit) (int*, char***); # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...); # endif @@ -594,13 +596,11 @@ static struct {"ruby_init", (RUBY_PROC*)&dll_ruby_init}, {"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath}, # ifdef WIN3264 - { # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER < 19 - "NtInitialize", + {"NtInitialize", (RUBY_PROC*)&dll_NtInitialize}, # else - "ruby_sysinit", + {"ruby_sysinit", (RUBY_PROC*)&dll_ruby_sysinit}, # endif - (RUBY_PROC*)&dll_NtInitialize}, # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 {"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf}, # endif diff --git a/src/version.c b/src/version.c index 2094db704b..bf4b82d10c 100644 --- a/src/version.c +++ b/src/version.c @@ -765,6 +765,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 191, +/**/ 190, /**/ 189, |