diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/mkmf.rb | 11 |
2 files changed, 11 insertions, 5 deletions
@@ -1,4 +1,7 @@ -Sun Aug 31 17:52:45 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> +Sun Aug 31 17:58:59 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * lib/mkmf.rb (Logging.log_open): opens in binary mode to get rid of + extra CR. * lib/mkmf.rb (try_func, try_var, have_struct_member), (scalar_ptr_type?, scalar_type?): use MAIN_DOES_NOTHING. diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 89b64bcad3..a403fa81d6 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -232,9 +232,13 @@ module Logging @postpone = 0 @quiet = $extmk - def self::open - @log ||= File::open(@logfile, 'w') + def self::log_open + @log ||= File::open(@logfile, 'wb') @log.sync = true + end + + def self::open + log_open $stderr.reopen(@log) $stdout.reopen(@log) yield @@ -244,8 +248,7 @@ module Logging end def self::message(*s) - @log ||= File::open(@logfile, 'w') - @log.sync = true + log_open @log.printf(*s) end |