[#39464] Re [ruby-dev:23297] 大文字・小文字の区別がDOSISHかどうかで変わる、パス名マッチ関数の提案 — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>

山本です。

25 messages 2004/04/01
[#39608] Re: Re [ruby-dev:23297] 大文字・小文字の区別がDOSISHかどうかで変わる、パス名マッチ関数の提案 — pegacorn@... 2004/05/02

遅い反応&File.fnmatchは使った事ない&ruby-devの方では

[#39609] Re: Re [ruby-dev:23297] 大文字・小文字の区別がDOSISHかどうかで変わる、パス名マッチ関数の提案 — pegacorn@... 2004/05/02

File.fnmatch(と Dir.glob)をちょっと使ってみたのですが、

[#39610] Re: Re [ruby-dev:23297] 大文字・小文字の区別がDOSISHかどうかで変わる、パス名マッチ関数の提案 — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2004/05/02

山本です。

[#39611] Re: Re [ruby-dev:23297] 大文字・小文字の区別がDOSISHかどうかで変わる、パス名マッチ関数の提案 — matz@... (Yukihiro Matsumoto) 2004/05/02

まつもと ゆきひろです

[#39613] Re: Re [ruby-dev:23297] 大文字・小文字の区別がDOSISHかどうかで変わる、パス名マッチ関数の提案 — pegacorn@... 2004/05/02

From: matz@ruby-lang.org (Yukihiro Matsumoto)

[#39616] Re: Re [ruby-dev:23297] 大文字・小文字の区別がDOSISHかどうかで変わる、パス名マッチ関数の提案 — matz@... (Yukihiro Matsumoto) 2004/05/02

まつもと ゆきひろです

[#39620] Re: Re [ruby-dev:23297] 大文字・小文字の区別がDOSISHかどうかで変わる、パス名マッチ関数の提案 — pegacorn@... 2004/05/03

From: matz@ruby-lang.org (Yukihiro Matsumoto)

[#39621] Re: Re [ruby-dev:23297] 大文字・小文字の区別がDOSISHかどうかで変わる、パス名マッチ関数の提案 — matz@... (Yukihiro Matsumoto) 2004/05/03

まつもと ゆきひろです

[#39622] Re: Re [ruby-dev:23297] 大文字・小文字の区別がDOSISHかどうかで変わる、パス名マッチ関数の提案 — pegacorn@... 2004/05/03

From: matz@ruby-lang.org (Yukihiro Matsumoto)

[ruby-list:39496] Re: trial version of Ruby/Tk

From: "Shirai,Kaoru" <shirai@...>
Date: 2004-04-05 02:10:32 UTC
List: ruby-list #39496
白井です。

> > ひょっとすると、pthreadの設定に気を付けるというのはFAQものでしょうか。
> tcltklib のディレクトリにある README.1st の中に
> -------------------------------------------------------------------
>  *** ATTENTION ***

うう、READMEなのに質問する前に読んでいなかった…恥ずかしい限りです。

落度を棚上して承知の上での提案なのですが、 ./configure した時に警告を
出すという案はいかがでしょうか。(添付のパッチ)

(でも単体ならともかく、Rubyの添付ライブラリとしてコンパイルしていると
目に入らないですね)

checking for --enable-pthread...
************************************************************************
** WARNING: Ruby is not compiled with --enable-pthread
**   When your Tcl/Tk libraries are compiled with "pthread support",
**   Ruby/Tk may cause "Hang-up" or "Segmentation Fault" frequently.
**   If you have such a trouble, please try to use the "--enable-pthread"
**   option of the "configure" command and re-compile Ruby sources.
**   It may help you to avoid this trouble.
************************************************************************
creating Makefile

この度は色々とありがとうございました。
-- 
Shirai,Kaoru <shirai@korinkan.co.jp>
Korinkan Ltd. - http://www.korinkan.co.jp/

Attachments (1)

extconf-warn-pthread.diff (1.46 KB, text/x-diff)
--- extconf.rb	2004/04/05 01:24:39	1.1
+++ extconf.rb	2004/04/05 01:46:13
@@ -47,12 +47,34 @@
   end
 end
 
+is_win32 = (/mswin32|mingw|cygwin|bccwin32/ =~ RUBY_PLATFORM)
 if have_header("tcl.h") && have_header("tk.h") &&
-    (/mswin32|mingw|cygwin|bccwin32/ =~ RUBY_PLATFORM || find_library("X11", "XOpenDisplay",
+    (is_win32 || find_library("X11", "XOpenDisplay",
 	"/usr/X11/lib", "/usr/lib/X11", "/usr/X11R6/lib", "/usr/openwin/lib")) &&
     find_tcl(tcllib, stubs) &&
     find_tk(tklib, stubs)
   $CPPFLAGS += ' -DUSE_TCL_STUBS -DUSE_TK_STUBS' if stubs
   $CPPFLAGS += ' -D_WIN32' if /cygwin/ =~ RUBY_PLATFORM
+
+  unless is_win32
+    puts("checking for --enable-pthread...")
+    pthread_enabled = try_cpp(%Q'\
+#include "ruby.h"
+#if !defined(HAVE_LIBPTHREAD)
+#error Ruby is not compiled with --enable-pthread.
+#endif
+')
+    pthread_enabled or puts(%Q'\
+************************************************************************
+** WARNING: Ruby is not compiled with --enable-pthread
+**   When your Tcl/Tk libraries are compiled with "pthread support", 
+**   Ruby/Tk may cause "Hang-up" or "Segmentation Fault" frequently.
+**   If you have such a trouble, please try to use the "--enable-pthread" 
+**   option of the "configure" command and re-compile Ruby sources. 
+**   It may help you to avoid this trouble.
+************************************************************************
+')
+  end
+    
   create_makefile("tcltklib")
 end

In This Thread