Charles Peacech wrote:

> On Wed, Jun 30, 2010 at 9:46 PM, Tux <[email protected]> wrote:
> > Charles schrob am 30.06.2010 16:35:
> >
> > It is provided here
> > http://www.garbagecollect.jp/ruby/mswin32/en/download/release.html
> >
> > I begin to despair, seriously. This one "works" but does not really like VS
> > 2008 (read: won't compile). Ruby 1.8 did.
> 
> Going futher, the problem also lies on if_ruby.c
> 
> #ifdef _WIN32
>           /* suggested by Ariya Mizutani */
>           int argc = 1;
>           char *argv[] = {"gvim.exe"};
>           NtInitialize(&argc, &argv);
> #endif
> #ifdef RUBY19_OR_LATER
>           RUBY_INIT_STACK;
> #endif
> 
> while RUBY_INIT_STACK is defined as
> 
> #define RUBY_INIT_STACK VALUE variable_in_this_stack_frame;
> ruby_init_stack(&variable_in_this_stack_frame);
> 
> This results in declaration after expression which is C99 standard and
> not supported by VS C compiler which only supports C89 standard.

How about doing it this way:

#ifdef DYNAMIC_RUBY
        if (ruby_enabled(TRUE))
        {
#endif
#ifdef _WIN32
            /* suggested by Ariya Mizutani */
            int argc = 1;
            char *argv[] = {"gvim.exe"};
            NtInitialize(&argc, &argv);
#endif
            {
#ifdef RUBY19_OR_LATER
                RUBY_INIT_STACK;
#endif
                ruby_init();
            }
#ifdef RUBY19_OR_LATER
            ruby_script("vim-ruby");

In other programs I often see RUBY_INIT_STACK and ruby_init() right
after each other, must be intentionally so.

-- 
Vi is clearly superior to emacs, since "vi" has only two characters
(and two keystrokes), while "emacs" has five.  (Randy C. Ford)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui