Compiling vim 7.3 with ruby 1.9.1 failed with gcc 4.5.0 on Win XP

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Compiling vim 7.3 with ruby 1.9.1 failed with gcc 4.5.0 on Win XP

Cesar Romani-2
By compiling vim 7.3a to the latest changeset with gcc 4.5.0 on Win
XP with MinGW I get the following errors:

--------------------
...
gcc -c ... if_ruby.c -o gobjZ/if_ruby.o
if_ruby.c:211:15: error: static declaration of 'dll_rb_cFalseClass'
follows non-static declaration
c:/ruby19/include/ruby-1.9.1/ruby/ruby.h:1022:19: note: previous
declaration of 'dll_rb_cFalseClass' was here
if_ruby.c:212:15: error: static declaration of 'dll_rb_cFixnum' follows
non-static declaration
c:/ruby19/include/ruby-1.9.1/ruby/ruby.h:1026:19: note: previous
declaration of 'dll_rb_cFixnum' was here
if_ruby.c:213:15: error: static declaration of 'dll_rb_cNilClass'
follows non-static declaration
c:/ruby19/include/ruby-1.9.1/ruby/ruby.h:1035:19: note: previous
declaration of 'dll_rb_cNilClass' was here
if_ruby.c:215:15: error: static declaration of 'dll_rb_cSymbol' follows
non-static declaration
c:/ruby19/include/ruby-1.9.1/ruby/ruby.h:1045:19: note: previous
declaration of 'dll_rb_cSymbol' was here
if_ruby.c:216:15: error: static declaration of 'dll_rb_cTrueClass'
follows non-static declaration
c:/ruby19/include/ruby-1.9.1/ruby/ruby.h:1048:19: note: previous
declaration of 'dll_rb_cTrueClass' was here
if_ruby.c:290:21: error: static declaration of 'rb_num2long_stub'
follows non-static declaration
c:/ruby19/include/ruby-1.9.1/ruby/ruby.h:398:14: note: previous
declaration of 'rb_num2long_stub' was here
if_ruby.c:294:14: error: static declaration of 'rb_int2big_stub' follows
non-static declaration
c:/ruby19/include/ruby-1.9.1/ruby/intern.h:83:7: note: previous
declaration of 'rb_int2big_stub' was here
make: *** [gobjZ/if_ruby.o] Error 1
--------------------

Those errors aren't produced if I use gcc 3.4.5
Following patch should fix it for gcc 4.5.0

--------------------
--- if_ruby.orig.c 2010-05-22 15:53:01.337086400 -0500
+++ if_ruby.c 2010-06-23 21:35:39.334497600 -0500
@@ -208,12 +208,12 @@
   * Pointers for dynamic link
   */
  static VALUE (*dll_rb_assoc_new) (VALUE, VALUE);
-static VALUE *dll_rb_cFalseClass;
-static VALUE *dll_rb_cFixnum;
-static VALUE *dll_rb_cNilClass;
+VALUE *dll_rb_cFalseClass;
+VALUE *dll_rb_cFixnum;
+VALUE *dll_rb_cNilClass;
  static VALUE *dll_rb_cObject;
-static VALUE *dll_rb_cSymbol;
-static VALUE *dll_rb_cTrueClass;
+VALUE *dll_rb_cSymbol;
+VALUE *dll_rb_cTrueClass;
  static void (*dll_rb_check_type) (VALUE,int);
  static VALUE (*dll_rb_class_path) (VALUE);
  static VALUE (*dll_rb_data_object_alloc) (VALUE, void*,
RUBY_DATA_FUNC, RUBY_DATA_FUNC);
@@ -287,11 +287,11 @@
  #endif

  #ifdef RUBY19_OR_LATER
-static SIGNED_VALUE rb_num2long_stub(VALUE x)
+SIGNED_VALUE rb_num2long_stub(VALUE x)
  {
      return dll_rb_num2long(x);
  }
-static VALUE rb_int2big_stub(SIGNED_VALUE x)
+VALUE rb_int2big_stub(SIGNED_VALUE x)
  {
      return dll_rb_int2big(x);
  }
--------------------

Regards,

--
Cesar

--
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