From e617fd0bf84f80de8fc40a1ea86e96bd2848493a Mon Sep 17 00:00:00 2001 From: eban Date: Thu, 29 May 2003 09:11:18 +0000 Subject: * win32/win32.c (_CRTIMP): redefine _CRTIMP on MinGW. * configure.in: remove '-D__USE_CRTIMP' from XCFLAGS on MinGW. * win32/win32.c (NtMakeCmdVector): handle quotes only if not instring. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 10 +++++++++- configure.in | 1 - sample/test.rb | 4 ++-- win32/win32.c | 7 ++++--- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 68b17ae4fb..8d8298c126 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Thu May 29 14:59:10 2003 WATANABE Hirofumi + + * win32/win32.c (_CRTIMP): redefine _CRTIMP on MinGW. + + * configure.in: remove '-D__USE_CRTIMP' from XCFLAGS on MinGW. + + * win32/win32.c (NtMakeCmdVector): handle quotes only if not instring. + Thu May 29 09:11:01 2003 Nobuyoshi Nakada * eval.c (ev_const_defined, ev_const_get), variable.c @@ -472,7 +480,7 @@ Tue May 13 20:31:58 2003 WATANABE Hirofumi * configure.in: add '--Wl,--enable-auto-import' to DLDFLAGS on Cygwin/MinGW. - * configure.in: add '-D_USE_CRTIMP' to XCFLAGS on MinGW. + * configure.in: add '-D__USE_CRTIMP' to XCFLAGS on MinGW. * ext/syck/handler.c: add proper casts. diff --git a/configure.in b/configure.in index c2f7c10e5a..e115561b8a 100644 --- a/configure.in +++ b/configure.in @@ -1178,7 +1178,6 @@ case "$target_os" in COMMON_LIBS=m COMMON_MACROS="WIN32_LEAN_AND_MEAN=" COMMON_HEADERS="windows.h winsock.h" - XCFLAGS='-D__USE_CRTIMP' ;; esac XCFLAGS="$XCFLAGS -DRUBY_EXPORT" diff --git a/sample/test.rb b/sample/test.rb index c43b3c040b..c4a0c6176a 100644 --- a/sample/test.rb +++ b/sample/test.rb @@ -928,9 +928,9 @@ class IterTest a end end -test_ok(IterTest.new(nil).method(:f).to_proc.call([1]) == [1]) +test_ok(IterTest.new(nil).method(:f).to_block.call([1]) == [1]) m = /\w+/.match("abc") -test_ok(IterTest.new(nil).method(:f).to_proc.call([m]) == [m]) +test_ok(IterTest.new(nil).method(:f).to_block.call([m]) == [m]) IterTest.new([0]).each0 {|x| test_ok(x == 0)} IterTest.new([1]).each1 {|x| test_ok(x == 1)} diff --git a/win32/win32.c b/win32/win32.c index 1441a25c2b..7fa962f15b 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1213,7 +1213,7 @@ NtMakeCmdVector (char *cmdline, char ***vec, int InputCmd) // we can remove them. // - if (InputCmd && (base[0] == '\"' && base[len-1] == '\"')) { + if (InputCmd && !instring && (base[0] == '\"' && base[len-1] == '\"')) { char *p; base++; len -= 2; @@ -1225,7 +1225,7 @@ NtMakeCmdVector (char *cmdline, char ***vec, int InputCmd) } } } - else if (InputCmd && (base[0] == '\'' && base[len-1] == '\'')) { + else if (InputCmd && !instring && (base[0] == '\'' && base[len-1] == '\'')) { base++; len -= 2; } @@ -1562,7 +1562,8 @@ typedef struct { #endif } ioinfo; -#if !defined _CRTIMP +#if !defined _CRTIMP || defined __MINGW32__ +#undef _CRTIMP #define _CRTIMP __declspec(dllimport) #endif -- cgit v1.2.3