diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cgi.rb | 2 | ||||
-rw-r--r-- | lib/fileutils.rb | 2 | ||||
-rw-r--r-- | lib/mkmf.rb | 6 | ||||
-rw-r--r-- | lib/xsd/charset.rb | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/lib/cgi.rb b/lib/cgi.rb index 29351c24bf..103452a762 100644 --- a/lib/cgi.rb +++ b/lib/cgi.rb @@ -1036,7 +1036,7 @@ class CGI eval <<-END def body.local_path - #{body.path.dump} + #{(body.class == StringIO)? "" : body.path.dump} end END diff --git a/lib/fileutils.rb b/lib/fileutils.rb index ee62f5838b..dbab74aae0 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -751,7 +751,7 @@ module FileUtils end def have_st_ino? - /mswin|mingw|bccwin|wince|emx/ !~ RUBY_PLATFORM + /djgpp|mswin|mingw|bccwin|wince|emx/ !~ RUBY_PLATFORM end def fu_stream_blksize( *streams ) diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 4628cb51c0..15a74aec16 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -215,6 +215,7 @@ def link_command(ldflags, opt="", libpath=$LIBPATH) 'INCFLAGS' => $INCFLAGS, 'CPPFLAGS' => $CPPFLAGS, 'CFLAGS' => "#$CFLAGS", + 'XCFLAGS' => "#$XCFLAGS", 'LDFLAGS' => "#$LDFLAGS #{ldflags}", 'LIBPATH' => libpathflag(libpath), 'LOCAL_LIBS' => "#$LOCAL_LIBS #$libs", @@ -223,7 +224,7 @@ end def cc_command(opt="") "$(CC) -c #$INCFLAGS -I#{$hdrdir} " \ - "#$CPPFLAGS #$CFLAGS #{opt} #{CONFTEST_C}" + "#$CPPFLAGS #$CFLAGS #$XCFLAGS #{opt} #{CONFTEST_C}" end def cpp_command(outfile, opt="") @@ -720,7 +721,7 @@ LIBRUBY_A = #{CONFIG['LIBRUBY_A']} LIBRUBYARG_SHARED = #$LIBRUBYARG_SHARED LIBRUBYARG_STATIC = #$LIBRUBYARG_STATIC -CFLAGS = #{CONFIG['CCDLFLAGS'] unless $static} #$CFLAGS +CFLAGS = #{CONFIG['CCDLFLAGS'] unless $static} #{CONFIG['XCFLAGS']} #$CFLAGS CPPFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir) #{$defs.join(" ")} #{$CPPFLAGS} CXXFLAGS = $(CFLAGS) #{CONFIG['CXXFLAGS']} DLDFLAGS = #$LDFLAGS #{CONFIG['DLDFLAGS']} #$DLDFLAGS @@ -943,6 +944,7 @@ def init_mkmf(config = CONFIG) $enable_shared = config['ENABLE_SHARED'] == 'yes' $defs = [] $CFLAGS = with_config("cflags", arg_config("CFLAGS", config["CFLAGS"])).dup + $XCFLAGS = config['XCFLAGS'].dup $CPPFLAGS = with_config("cppflags", arg_config("CPPFLAGS", config["CPPFLAGS"])).dup $LDFLAGS = (with_config("ldflags") || "").dup $INCFLAGS = "-I#{$topdir}" diff --git a/lib/xsd/charset.rb b/lib/xsd/charset.rb index 88d4f99043..3daace7bf3 100644 --- a/lib/xsd/charset.rb +++ b/lib/xsd/charset.rb @@ -41,7 +41,7 @@ public EncodingConvertMap[['UTF8', 'EUC' ]] = Proc.new { |str| IconvCharset.safe_iconv("euc-jp", "utf-8", str) } EncodingConvertMap[['EUC' , 'UTF8']] = Proc.new { |str| IconvCharset.safe_iconv("utf-8", "euc-jp", str) } EncodingConvertMap[['EUC' , 'SJIS']] = Proc.new { |str| IconvCharset.safe_iconv("shift-jis", "euc-jp", str) } - if /(mswin|bccwin|mingw|cygwin)/ =~ RUBY_PLATFORM + if /(mswin|bccwin|mingw|cygwin|emx)/ =~ RUBY_PLATFORM EncodingConvertMap[['UTF8', 'SJIS']] = Proc.new { |str| IconvCharset.safe_iconv("cp932", "utf-8", str) } EncodingConvertMap[['SJIS', 'UTF8']] = Proc.new { |str| IconvCharset.safe_iconv("utf-8", "cp932", str) } EncodingConvertMap[['SJIS', 'EUC' ]] = Proc.new { |str| IconvCharset.safe_iconv("euc-jp", "cp932", str) } |