From: "U.Nakamura" Date: 2002-08-30T08:23:53+09:00 Subject: [ruby-dev:18104] Shim with VC++5 CVSにあるShimをVC++5でmakeしようとしたところ、いくつか問題に 遭遇したので、パッチです。これでいいのかなぁ。 (1) ext/features/ruby18/fileで、リンクに失敗する。 → user32.libの有無をチェックし、あればリンクするように (2) ext/stringioで、コンパイルエラー。 → VC++5が悪い気がしますが、括弧を追加 (3) ext/iconvで、Makefileが生成されないのにmakeしにいく。 → Makefileが生成されなかったらmakeしないように Index: install.rb =================================================================== RCS file: /src/shim/ruby16/install.rb,v retrieving revision 1.2 diff -u -1 -p -r1.2 install.rb --- install.rb 2002/06/08 17:15:43 1.2 +++ install.rb 2002/08/29 22:54:02 @@ -625,3 +625,3 @@ class Installer def setup_dir_ext( relpath ) - if extdir? curr_srcdir then + if extdir? curr_srcdir and File.exist? 'Makefile' then make Index: ext/features/ruby18/file/extconf.rb =================================================================== RCS file: /src/shim/ruby16/ext/features/ruby18/file/extconf.rb,v retrieving revision 1.1 diff -u -1 -p -r1.1 extconf.rb --- ext/features/ruby18/file/extconf.rb 2002/04/14 00:31:38 1.1 +++ ext/features/ruby18/file/extconf.rb 2002/08/29 22:54:02 @@ -6,2 +6,3 @@ have_func('lchmod') have_func('lchown') +have_library('user32') Index: ext/stringio/stringio.c =================================================================== RCS file: /src/shim/ruby16/ext/stringio/stringio.c,v retrieving revision 1.16 diff -u -1 -p -r1.16 stringio.c --- ext/stringio/stringio.c 2002/08/28 10:18:08 1.16 +++ ext/stringio/stringio.c 2002/08/29 22:54:02 @@ -27,3 +27,3 @@ #ifndef RB_STRING_VALUE -#define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : *(volatile VALUE *)&(s) = rb_str_to_str(s)) +#define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s))) #endif それでは。-- U.Nakamura