components/vim/vim72-patches/7.2.360
changeset 198 172fc01ce997
equal deleted inserted replaced
197:fd801ec0737c 198:172fc01ce997
       
     1 To: [email protected]
       
     2 Subject: Patch 7.2.360
       
     3 Fcc: outbox
       
     4 From: Bram Moolenaar <[email protected]>
       
     5 Mime-Version: 1.0
       
     6 Content-Type: text/plain; charset=UTF-8
       
     7 Content-Transfer-Encoding: 8bit
       
     8 ------------
       
     9 
       
    10 Patch 7.2.360
       
    11 Problem:    Ruby on MS-Windows: can't use sockets.
       
    12 Solution:   Call NtInitialize() during initialization. (Ariya Mizutani)
       
    13 Files:	    src/if_ruby.c
       
    14 
       
    15 
       
    16 *** ../vim-7.2.359/src/if_ruby.c	2009-05-22 18:20:23.000000000 +0200
       
    17 --- src/if_ruby.c	2010-02-17 15:04:00.000000000 +0100
       
    18 ***************
       
    19 *** 48,53 ****
       
    20 --- 48,58 ----
       
    21   # endif
       
    22   #endif
       
    23   
       
    24 + /* suggested by Ariya Mizutani */
       
    25 + #if (_MSC_VER == 1200)
       
    26 + # undef _WIN32_WINNT
       
    27 + #endif
       
    28 + 
       
    29   #include <ruby.h>
       
    30   
       
    31   #undef EXTERN
       
    32 ***************
       
    33 *** 132,137 ****
       
    34 --- 137,143 ----
       
    35   #define ruby_errinfo			(*dll_ruby_errinfo)
       
    36   #define ruby_init			dll_ruby_init
       
    37   #define ruby_init_loadpath		dll_ruby_init_loadpath
       
    38 + #define NtInitialize			dll_NtInitialize
       
    39   #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
       
    40   # define rb_w32_snprintf		dll_rb_w32_snprintf
       
    41   #endif
       
    42 ***************
       
    43 *** 186,191 ****
       
    44 --- 192,198 ----
       
    45   static VALUE *dll_ruby_errinfo;
       
    46   static void (*dll_ruby_init) (void);
       
    47   static void (*dll_ruby_init_loadpath) (void);
       
    48 + static void (*dll_NtInitialize) (int*, char***);
       
    49   #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
       
    50   static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...);
       
    51   #endif
       
    52 ***************
       
    53 *** 248,253 ****
       
    54 --- 255,261 ----
       
    55       {"ruby_errinfo", (RUBY_PROC*)&dll_ruby_errinfo},
       
    56       {"ruby_init", (RUBY_PROC*)&dll_ruby_init},
       
    57       {"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath},
       
    58 +     {"NtInitialize", (RUBY_PROC*)&dll_NtInitialize},
       
    59   #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
       
    60       {"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf},
       
    61   #endif
       
    62 ***************
       
    63 *** 414,419 ****
       
    64 --- 422,433 ----
       
    65   	if (ruby_enabled(TRUE))
       
    66   	{
       
    67   #endif
       
    68 + #ifdef _WIN32
       
    69 + 	    /* suggested by Ariya Mizutani */
       
    70 + 	    int argc = 1;
       
    71 + 	    char *argv[] = {"gvim.exe"};
       
    72 + 	    NtInitialize(&argc, &argv);
       
    73 + #endif
       
    74   	    ruby_init();
       
    75   	    ruby_init_loadpath();
       
    76   	    ruby_io_init();
       
    77 *** ../vim-7.2.359/src/version.c	2010-02-11 18:54:38.000000000 +0100
       
    78 --- src/version.c	2010-02-17 15:10:22.000000000 +0100
       
    79 ***************
       
    80 *** 683,684 ****
       
    81 --- 683,686 ----
       
    82   {   /* Add new patch number below this line */
       
    83 + /**/
       
    84 +     360,
       
    85   /**/
       
    86 
       
    87 -- 
       
    88 "After a few years of marriage a man can look right at a woman
       
    89 without seeing her and a woman can see right through a man
       
    90 without looking at him."
       
    91  - Helen Rowland
       
    92 
       
    93  /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
       
    94 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
       
    95 \\\        download, build and distribute -- http://www.A-A-P.org        ///
       
    96  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///