mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
updated for version 7.2.360
Problem: Ruby on MS-Windows: can't use sockets. Solution: Call NtInitialize() during initialization. (Ariya Mizutani)
This commit is contained in:
@@ -48,6 +48,11 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* suggested by Ariya Mizutani */
|
||||||
|
#if (_MSC_VER == 1200)
|
||||||
|
# undef _WIN32_WINNT
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <ruby.h>
|
#include <ruby.h>
|
||||||
|
|
||||||
#undef EXTERN
|
#undef EXTERN
|
||||||
@@ -132,6 +137,7 @@ static void ruby_vim_init(void);
|
|||||||
#define ruby_errinfo (*dll_ruby_errinfo)
|
#define ruby_errinfo (*dll_ruby_errinfo)
|
||||||
#define ruby_init dll_ruby_init
|
#define ruby_init dll_ruby_init
|
||||||
#define ruby_init_loadpath dll_ruby_init_loadpath
|
#define ruby_init_loadpath dll_ruby_init_loadpath
|
||||||
|
#define NtInitialize dll_NtInitialize
|
||||||
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
|
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
|
||||||
# define rb_w32_snprintf dll_rb_w32_snprintf
|
# define rb_w32_snprintf dll_rb_w32_snprintf
|
||||||
#endif
|
#endif
|
||||||
@@ -186,6 +192,7 @@ static VALUE (*dll_rb_str_new2) (const char*);
|
|||||||
static VALUE *dll_ruby_errinfo;
|
static VALUE *dll_ruby_errinfo;
|
||||||
static void (*dll_ruby_init) (void);
|
static void (*dll_ruby_init) (void);
|
||||||
static void (*dll_ruby_init_loadpath) (void);
|
static void (*dll_ruby_init_loadpath) (void);
|
||||||
|
static void (*dll_NtInitialize) (int*, char***);
|
||||||
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
|
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
|
||||||
static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...);
|
static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...);
|
||||||
#endif
|
#endif
|
||||||
@@ -248,6 +255,7 @@ static struct
|
|||||||
{"ruby_errinfo", (RUBY_PROC*)&dll_ruby_errinfo},
|
{"ruby_errinfo", (RUBY_PROC*)&dll_ruby_errinfo},
|
||||||
{"ruby_init", (RUBY_PROC*)&dll_ruby_init},
|
{"ruby_init", (RUBY_PROC*)&dll_ruby_init},
|
||||||
{"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath},
|
{"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath},
|
||||||
|
{"NtInitialize", (RUBY_PROC*)&dll_NtInitialize},
|
||||||
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
|
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
|
||||||
{"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf},
|
{"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf},
|
||||||
#endif
|
#endif
|
||||||
@@ -413,6 +421,12 @@ static int ensure_ruby_initialized(void)
|
|||||||
#ifdef DYNAMIC_RUBY
|
#ifdef DYNAMIC_RUBY
|
||||||
if (ruby_enabled(TRUE))
|
if (ruby_enabled(TRUE))
|
||||||
{
|
{
|
||||||
|
#endif
|
||||||
|
#ifdef _WIN32
|
||||||
|
/* suggested by Ariya Mizutani */
|
||||||
|
int argc = 1;
|
||||||
|
char *argv[] = {"gvim.exe"};
|
||||||
|
NtInitialize(&argc, &argv);
|
||||||
#endif
|
#endif
|
||||||
ruby_init();
|
ruby_init();
|
||||||
ruby_init_loadpath();
|
ruby_init_loadpath();
|
||||||
|
@@ -681,6 +681,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 */
|
||||||
|
/**/
|
||||||
|
360,
|
||||||
/**/
|
/**/
|
||||||
359,
|
359,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user