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/if_ruby.c | |
parent | 810f9c361c83afb36b9f1cdadca2b93f1201d039 (diff) | |
download | vim-git-4f391796b7de78a434a2cc7107034603df414905.tar.gz |
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/if_ruby.c')
-rw-r--r-- | src/if_ruby.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/if_ruby.c b/src/if_ruby.c index 509d2f6cf..afa27abe2 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 |