[#18186] [req] Marshal — keiju@... (Keiju ISHITSUKA)

けいじゅ@日本ラショナルソフトウェアです.

14 messages 2002/09/05
[#18190] Re: [req] Marshal — matz@... (Yukihiro Matsumoto) 2002/09/05

まつもと ゆきひろです

[#18229] Re: [ruby-cvs] rough/ext/stringio: * ruby-stringio.spec: 0.0.7, added changelog. — "U.Nakamura" <usa@...>

こんにちは、なかむら(う)です。

22 messages 2002/09/09
[#18230] Re: [ruby-cvs] rough/ext/stringio: * ruby-stringio.spec: 0.0.7, added changelog. — nobu.nakada@... 2002/09/09

なかだです。

[#18231] Re: [ruby-cvs] rough/ext/stringio: * ruby-stringio.spec: 0.0.7, added changelog. — "U.Nakamura" <usa@...> 2002/09/09

こんにちは、なかむら(う)です。

[#18232] Re: [ruby-cvs] rough/ext/stringio: * ruby-stringio.spec: 0.0.7, added changelog. — nobu.nakada@... 2002/09/09

なかだです。

[#18233] Re: [ruby-cvs] rough/ext/stringio: * ruby-stringio.spec: 0.0.7, added changelog. — "U.Nakamura" <usa@...> 2002/09/09

こんにちは、なかむら(う)です。

[#18234] Re: [ruby-cvs] rough/ext/stringio: * ruby-stringio.spec: 0.0.7, added changelog. — WATANABE Hirofumi <eban@...> 2002/09/09

わたなべです。

[#18236] Re: [ruby-cvs] rough/ext/stringio: * ruby-stringio.spec: 0.0.7, added changelog. — "U.Nakamura" <usa@...> 2002/09/09

こんにちは、なかむら(う)です。

[#18238] Re: [ruby-cvs] rough/ext/stringio: * ruby-stringio.spec: 0.0.7, added changelog. — WATANABE Hirofumi <eban@...> 2002/09/09

わたなべです。

[#18241] Re: [ruby-cvs] rough/ext/stringio: * ruby-stringio.spec: 0.0.7, added changelog. — "U.Nakamura" <usa@...> 2002/09/09

こんにちは、なかむら(う)です。

[#18285] rubicon on EWS4800 — Koji Arai <JCA02266@...>

新井です。

59 messages 2002/09/13
[#18322] Re: rubicon on EWS4800 — Koji Arai <JCA02266@...> 2002/09/21

新井です。

[#18333] Re: rubicon on EWS4800 — kjana@...4lab.to (YANAGAWA Kazuhisa) 2002/09/21

In message <20020921.152641.11483667.JCA02266@nifty.ne.jp>

[#18336] Re: rubicon on EWS4800 — nobu.nakada@... 2002/09/21

なかだです。

[#18337] Re: rubicon on EWS4800 — Tanaka Akira <akr@...17n.org> 2002/09/21

In article <200209211605.g8LG52p04564@sharui.nakada.kanuma.tochigi.jp>,

[#18338] Re: rubicon on EWS4800 — nobu.nakada@... 2002/09/21

なかだです。

[#18341] Re: rubicon on EWS4800 — Tanaka Akira <akr@...17n.org> 2002/09/21

In article <200209211628.g8LGSxp04786@sharui.nakada.kanuma.tochigi.jp>,

[#18342] Re: rubicon on EWS4800 — nobu.nakada@... 2002/09/21

なかだです。

[#18343] Re: rubicon on EWS4800 — Tanaka Akira <akr@...17n.org> 2002/09/21

In article <200209211739.g8LHdKp05495@sharui.nakada.kanuma.tochigi.jp>,

[#18345] Re: rubicon on EWS4800 — nobu.nakada@... 2002/09/22

なかだです。

[#18349] Re: rubicon on EWS4800 — Tanaka Akira <akr@...17n.org> 2002/09/22

In article <200209220415.g8M4Fkp24392@sharui.nakada.kanuma.tochigi.jp>,

[#18374] Re: [ruby-cvs] ruby/ext/tcltklib: * eval.c (ruby_run): should set toplevel visibility again here. — WATANABE Hirofumi <eban@...>

わたなべです。

20 messages 2002/09/25
[#18376] Re: [ruby-cvs] ruby/ext/tcltklib: * eval.c (ruby_run): should set toplevel visibility again here. — matz@... (Yukihiro Matsumoto) 2002/09/25

まつもと ゆきひろです

[#18377] Re: [ruby-cvs] ruby/ext/tcltklib: * eval.c (ruby_run): should set toplevel visibility again here. — nobu.nakada@... 2002/09/25

なかだです。

[#18378] Re: [ruby-cvs] ruby/ext/tcltklib: * eval.c (ruby_run): should set toplevel visibility again here. — WATANABE Hirofumi <eban@...> 2002/09/25

わたなべです。

[ruby-dev:18162] Re: Shim with VC++5

From: nobu.nakada@...
Date: 2002-09-03 09:51:42 UTC
List: ruby-dev #18162
なかだです。

At Fri, 30 Aug 2002 15:01:01 +0900,
WATANABE Hirofumi wrote:
> > そもそも、egrep_cppって使われてるの? とか思ったりもしたんで
> > すけど(README.EXTにも書いてないし)、ext/etcとext/socketで使
> > ってますね...
> 
> 構造体のmemberの確認とか定数がdefineされてるかどうかとかが多
> いようです。defineされてるかどうかはtry_cppだけでわかるから
> ext/socket/extconf.rbでegrep_cppは使う必要がなさそうですね。
> memberの有無も専用の関数を用意するかtry_compileを作ったほう
> がよさそう。

try_compileと、ついでに.SUFFIXESも追加してみました。

あと最近気づいたんですが、xsystemでもConfig.expandしているので
呼び出し側でやる必要はないような。


Index: ext/extmk.rb.in
===================================================================
RCS file: /cvs/ruby/src/ruby/ext/extmk.rb.in,v
retrieving revision 1.84
diff -u -2 -p -r1.84 ext/extmk.rb.in
--- ext/extmk.rb.in	3 Sep 2002 08:40:47 -0000	1.84
+++ ext/extmk.rb.in	3 Sep 2002 09:29:16 -0000
@@ -63,4 +63,5 @@ end
 
 $LINK = "#{CONFIG['CC']} #{OUTFLAG}conftest -I#$topdir -I#$top_srcdir #{CFLAGS} %s %s #{CONFIG['LDFLAGS']} %s conftest.c %s %s #{CONFIG['LIBS']}"
+$CC = "#{CONFIG['CC']} -c %s -I#$topdir -I#$top_srcdir #{CFLAGS} %s %s conftest.c"
 $CPP = "#{CONFIG['CPP']} #{CONFIG['CPPFLAGS']} %s -I#$topdir -I#$top_srcdir #{CFLAGS} %s %s conftest.c"
 
Index: mkmf.rb
===================================================================
RCS file: /cvs/ruby/src/ruby/lib/mkmf.rb,v
retrieving revision 1.90
diff -u -2 -p -r1.90 lib/mkmf.rb
--- lib/mkmf.rb	3 Sep 2002 08:40:47 -0000	1.90
+++ lib/mkmf.rb	3 Sep 2002 09:17:27 -0000
@@ -87,4 +87,5 @@ else
 end
 $LINK = "#{CONFIG['CC']} #{OUTFLAG}conftest -I#{$hdrdir} #{CFLAGS} %s %s #{CONFIG['LDFLAGS']} %s conftest.c %s %s #{CONFIG['LIBS']}"
+$CC = "#{CONFIG['CC']} -c %s -I#{$hdrdir} #{CFLAGS} %s %s conftest.c"
 $CPP = "#{CONFIG['CPP']} -E %s -I#{$hdrdir} #{CFLAGS} %s %s conftest.c"
 
@@ -126,9 +127,11 @@ def xsystem command
   $stderr.reopen($log) 
   $stdout.reopen($log) 
-  puts command
-  r = system(command)
-  $stderr.reopen($orgerr)
-  $stdout.reopen($orgout)
-  return r
+  begin
+    puts command
+    system(command)
+  ensure
+    $stderr.reopen($orgerr)
+    $stdout.reopen($orgout)
+  end
 end
 
@@ -145,5 +148,5 @@ def try_link0(src, opt="")
   end
   begin
-    xsystem(Config.expand(format($LINK, $CFLAGS, $CPPFLAGS, $LDFLAGS, opt, $LOCAL_LIBS)))
+    xsystem(format($LINK, $CFLAGS, $CPPFLAGS, $LDFLAGS, opt, $LOCAL_LIBS))
   ensure
     $LDFLAGS = ldflags
@@ -163,4 +166,15 @@ def try_link(src, opt="")
 end
 
+def try_compile(src, opt="")
+  cfile = open("conftest.c", "w")
+  cfile.print src
+  cfile.close
+  begin
+    xsystem(format($CC, $CPPFLAGS, $CFLAGS, opt))
+  ensure
+    rm_f "conftest*"
+  end
+end
+
 def try_cpp(src, opt="")
   cfile = open("conftest.c", "w")
@@ -168,5 +182,5 @@ def try_cpp(src, opt="")
   cfile.close
   begin
-    xsystem(Config.expand(format($CPP, $CPPFLAGS, $CFLAGS, opt)))
+    xsystem(format($CPP, $CPPFLAGS, $CFLAGS, opt))
   ensure
     rm_f "conftest*"
@@ -178,6 +192,15 @@ def egrep_cpp(pat, src, opt="")
   cfile.print src
   cfile.close
+  if Regexp === pat
+    src = pat.source
+  else
+    pat = Regexp.new(src = pat)
+  end
   begin
-    xsystem(Config.expand(format($CPP, $CPPFLAGS, $CFLAGS, opt))+"|egrep #{pat}")
+    xsystem("|"+format(CPP, $CFLAGS, $CPPFLAGS, opt)) do |f|
+      puts("   #{src}")
+      f.grep(pat) {return true}
+    end
+    false
   ensure
     rm_f "conftest*"
@@ -344,5 +367,5 @@ SRC
     r = try_link(src + <<"SRC", libs)
 int main() { return 0; }
-int t() { void ((*p)()); p = (void ((*)()))#{func}; return 0; }
+int t() { void ((*volatile p)()); p = (void ((*)()))#{func}; return 0; }
 SRC
   end
@@ -475,5 +498,5 @@ def create_makefile(target, srcprefix = 
   $DLDFLAGS = CONFIG["DLDFLAGS"]
 
-  $libs = CONFIG["LIBRUBYARG"] + " " + $libs
+  $libs = CONFIG["LIBRUBYARG"] + " " + $libs + CONFIG["LIBS"]
   $configure_args['--enable-shared'] or $LIBPATH |= [$topdir]
   $LIBPATH |= [CONFIG["libdir"]]
@@ -648,4 +671,6 @@ EOMF
     cxxopt = '-Tp'
   end
+
+  mfile.print ".SUFFIXES: .#{SRC_EXT.join(' .')} .#{$OBJEXT}\n"
   unless /nmake/i =~ $make
     if /bccwin32/ =~ RUBY_PLATFORM


-- 
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
    中田 伸悦

In This Thread