From: Satoshi Nojo Date: 2000-05-28T15:53:30+09:00 Subject: [ruby-dev:9877] Re: patches for Cygwin 1.1.0 能條といいます. WATANABE Hirofumi さんは書きました: >DLEXT は .so にしちゃうのも過激なので .dll も見るように >DLEXT2 を新たに追加しました. .dll しか読みに行かず,.so を読み込んでくれません. > ruby -v ruby 1.5.4 (2000-05-25) [i586-cygwin] > ruby -e "require 'dbm.so'" -e:1:in `require': No such file to load -- dbm.so (LoadError) from -e:1 以下パッチです(これで良いのか?). --- eval.c.orig Sat May 27 23:02:02 2000 +++ eval.c Sun May 28 15:31:46 2000 @@ -4970,8 +4970,12 @@ strcpy(ext, DLEXT); file = feature = buf; } + file = rb_find_file(file); + if (file) goto load_dyna; + #ifdef DLEXT2 - else if (strcmp(ext, DLEXT2) != 0) { + if (strcmp(ext, DLEXT2) != 0) { + file = feature = RSTRING(fname)->ptr; buf = ALLOCA_N(char, strlen(file)+sizeof(DLEXT2)+4); strcpy(buf, feature); ext = strrchr(buf, '.'); @@ -4979,10 +4983,10 @@ if (rb_provided(buf)) return Qfalse; strcpy(ext, DLEXT2); file = feature = buf; + file = rb_find_file(file); + if (file) goto load_dyna; } #endif - file = rb_find_file(file); - if (file) goto load_dyna; } else if (strcmp(DLEXT, ext) == 0) { feature = RSTRING(fname)->ptr; ---- Satoshi Nojo eMail: nojo@t-samukawa.or.jp