[#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:18346] Re: Shim with VC++5

From: nobu.nakada@...
Date: 2002-09-22 06:41:44 UTC
List: ruby-dev #18346
なかだです。

At Fri, 6 Sep 2002 23:39:51 +0900,
WATANABE Hirofumi wrote:
> > しかし、systemのコマンドに"|"つけてもまったく意味ないというか、
> > いつもエラーになるだけなので、修正してコミットしました。
> 
> もはやWin95系のマシンがわたしの周りから消えてしまったので
> command.comを相手の確認はできないんですが、$CPPに-o conftest.i
> (cl.exeでは-P、bcc32.exeでは-oconftest.i)を追加しようと思って
> いたので、dupしなくても普通にファイルをegrepしてもいいかもし
> れません。
> 
> でもせっかくだから$CPPと$CPPSTDOUTと2つ用意しよう。

CPPOUTFILEはconfigure.inも絡むのでとりあえず置いといて、
Logging, try_compile, egrep_cpp, have_func, .SUFFIXESあたりだけ
1.6のほうにもバックポートしたいと思いますが、どうでしょうか。


Index: mkmf.rb
===================================================================
RCS file: /cvs/ruby/src/ruby/lib/mkmf.rb,v
retrieving revision 1.37.2.42
diff -u -2 -p -r1.37.2.42 mkmf.rb
--- mkmf.rb	11 Sep 2002 15:58:50 -0000	1.37.2.42
+++ mkmf.rb	22 Sep 2002 06:37:23 -0000
@@ -64,4 +64,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 #{CONFIG['CPPFLAGS']} %s -I#{$hdrdir} #{CFLAGS} %s %s conftest.c"
 CPP = "#{CONFIG['CPP']} -E %s -I#{$hdrdir} #{CFLAGS} %s %s conftest.c"
 
@@ -77,24 +78,54 @@ def rm_f(*files)
 end
 
-$log = nil
+module Logging
+  @log = nil
+  @logfile = 'mkmf.log'
+  @orgerr = $stderr.dup
+  @orgout = $stdout.dup
+
+  def self::open
+    @log ||= File::open(@logfile, 'w')
+    $stderr.reopen(@log)
+    $stdout.reopen(@log)
+    yield
+  ensure
+    $stderr.reopen(@orgerr)
+    $stdout.reopen(@orgout)
+  end
+
+  def self::message(*s)
+    @log ||= File::open(@logfile, 'w')
+    @log.printf(*s)
+  end
+
+  def self::logfile file
+    @logfile = file
+    if @log and not @log.closed?
+      @log.close
+      @log = nil
+    end
+  end
+end
 
-$orgerr = $stderr.dup
-$orgout = $stdout.dup
 def xsystem command
   Config.expand(command)
-  if $DEBUG
+  Logging::open do
     puts command
     $stdout.flush
-    return system(command)
+    system(command)
+  end
+end
+
+def xpopen command, *mode, &block
+  Config.expand(command)
+  Logging::open do
+    case mode[0]
+    when nil, /^r/
+      puts "#{command} |"
+    else
+      puts "| #{command}"
+    end
+    IO.popen(command, *mode, &block)
   end
-  $log ||= open('mkmf.log', 'w')
-  $stderr.reopen($log) 
-  $stdout.reopen($log) 
-  puts command
-  $stdout.flush
-  r = system(command)
-  $stderr.reopen($orgerr)
-  $stdout.reopen($orgout)
-  return r
 end
 
@@ -126,4 +157,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")
@@ -142,5 +184,23 @@ def egrep_cpp(pat, src, opt="")
   cfile.close
   begin
-    xsystem(format(CPP+"|egrep #{pat}", $CPPFLAGS, $CFLAGS, opt))
+    xpopen(format(CPP, $CFLAGS, $CPPFLAGS, opt)) do |f|
+      if Regexp === pat
+	puts("    ruby -ne 'print if /#{pat.source}/'")
+	f.grep(pat) {|l|
+	  puts "#{f.lineno}: #{l}"
+	  return true
+	}
+	false
+      else
+	puts("    egrep '#{pat}'")
+	begin
+	  stdin = $stdin.dup
+	  $stdin.reopen(f)
+	  system("egrep", pat)
+	ensure
+	  $stdin.reopen(stdin)
+	end
+      end
+    end
   ensure
     rm_f "conftest*"
@@ -291,5 +351,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
@@ -400,5 +460,5 @@ def create_makefile(target, srcdir = $sr
 
   $libs = CONFIG["LIBRUBYARG"] + " " + $libs + " " + CONFIG["LIBS"]
-  $configure_args['--enable-shared'] or $LIBPATH |= [$topdir]
+  $configure_args['--enable-shared'] or $LIBPATH |= ["$(topdir)"]
   $LIBPATH |= [CONFIG["libdir"]]
 
@@ -529,4 +589,5 @@ EOMF
   mfile.printf "\n"
 
+  mfile.print ".SUFFIXES: .#{SRC_EXT.join(' .')} .#{$OBJEXT}\n"
   if /mswin32/ !~ RUBY_PLATFORM
     mfile.print "
@@ -565,6 +626,4 @@ EOMF
   else
     mfile.print "
-.SUFFIXES: .#{$OBJEXT}
-
 .c.#{$OBJEXT}:
 	$(CC) $(CFLAGS) $(CPPFLAGS) -c $(subst /,\\\\,$<)


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

In This Thread