From ruby-ext-admin@ruby-lang.org Thu Sep 13 09:41:52 2001 Received: from tonton.nagaokaut.ac.jp (tonton.nagaokaut.ac.jp [133.44.2.115]) by blade.nagaokaut.ac.jp (8.8.8/8.8.8/Debian/GNU) with ESMTP id JAA32597; Thu, 13 Sep 2001 09:41:51 +0900 Received: (from root@localhost) by tonton.nagaokaut.ac.jp (8.11.3/8.11.3) id f8D0V4u95630; Thu, 13 Sep 2001 09:31:04 +0900 (JST) (envelope-from ruby-ext-admin@ruby-lang.org) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by tonton.nagaokaut.ac.jp (8.11.3/8.11.3av) with ESMTP id f8D0V3E95623; Thu, 13 Sep 2001 09:31:03 +0900 (JST) (envelope-from ruby-ext-admin@ruby-lang.org) Received: from helium.ruby-lang.org (helium.ruby-lang.org [210.251.121.214]) by voscc.nagaokaut.ac.jp (8.9.3/3.7W) id JAA45715; Thu, 13 Sep 2001 09:35:08 +0900 (JST) Received: from helium.ruby-lang.org (localhost [127.0.0.1]) by helium.ruby-lang.org (Postfix) with ESMTP id 1FDE33A15; Thu, 13 Sep 2001 09:34:37 +0900 (JST) Date: Thu, 13 Sep 2001 09:06:56 +0900 From: nobu.nakada@nifty.ne.jp Reply-To: ruby-ext@ruby-lang.org Subject: [ruby-ext:01929] [PATCH] Ruby/FLTK To: ruby-ext@ruby-lang.org (ruby-ext ML) Message-Id: <200109130007.f8D07Ge19735@sharui.nakada.kanuma.tochigi.jp> X-ML-Name: ruby-ext X-Mail-Count: 01929 X-MLServer: fml [fml 3.0pl#17]; post only (only members can post) X-ML-Info: If you have a question, send e-mail with the body "help" (without quotes) to the address ruby-ext-ctl@ruby-lang.org; help= User-Agent: Wanderlust/2.2.11 (Iris) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) MULE XEmacs/21.2 (beta32) (Kastor & Polydeukes) (i686-pc-linux) Mime-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=ISO-2022-JP Precedence: bulk Lines: 64 X-Virus-Scanned: by AMaViS perl-10 なかだです。  Ruby/FLTKの最新版ですが、1.6、1.7ともにコンパイルできません。 RUBY_VERSION_CODEはversion.hをincludeしないと使えませんし、それ にrb_hash_delete()が追加されたのは1.7.1の途中なのであまりよろし くないのではないかと。RUBY_METHOD_FUNC()の方はまぁとりあえずこ んなところで通るようになりますが、1.6だとC++のことは元々あんま り考えてないので、どこかに無理があるかも知れません。 Index: extconf.rb =================================================================== RCS file: /cvsroot/ruby-fltk/ruby-fltk/extconf.rb,v retrieving revision 1.11 diff -u -2 -p -r1.11 extconf.rb --- extconf.rb 2001/09/12 08:21:04 1.11 +++ extconf.rb 2001/09/13 00:04:10 @@ -76,4 +76,6 @@ if( use_xunicode ) end +have_func("rb_hash_delete", "ruby.h") + if( have_fl_h && have_libfltk ) create_makefile("rubyfltk") Index: fltk.cc =================================================================== RCS file: /cvsroot/ruby-fltk/ruby-fltk/fltk.cc,v retrieving revision 1.49 diff -u -2 -p -r1.49 fltk.cc --- fltk.cc 2001/09/12 07:59:23 1.49 +++ fltk.cc 2001/09/13 00:04:10 @@ -48,5 +48,5 @@ ID rb_id_icallback_data; ID rb_id_call; -#if RUBY_VERSION_CODE < 171 +#ifndef HAVE_RB_HASH_DELETE extern "C" { typedef struct st_table_entry { Index: fltk.h =================================================================== RCS file: /cvsroot/ruby-fltk/ruby-fltk/fltk.h,v retrieving revision 1.57 diff -u -2 -p -r1.57 fltk.h --- fltk.h 2001/09/11 22:47:57 1.57 +++ fltk.h 2001/09/13 00:04:11 @@ -836,6 +836,11 @@ VALUE rb_fltk_##method(VALUE mod, VALUE return INT2NUM(ret); \ }; - + +/* old RUBY_METHOD_FUNC() definition doesn't match to prototypes in those days. */ +#ifndef ANYARGS +#undef RUBY_METHOD_FUNC +#define RUBY_METHOD_FUNC(func) ((VALUE (*)())func) +#endif /* wrappers for rb_define_{method,singleton_method,module_function} */ -- --- 僕の前にBugはない。 --- 僕の後ろにBugはできる。 中田 伸悦