ruby-changes:7323
From: usa <ko1@a...>
Date: Mon, 25 Aug 2008 23:58:24 +0900 (JST)
Subject: [ruby-changes:7323] Ruby:r18842 (trunk): * win32.c (init_stdhandle): set binmode.
usa 2008-08-25 23:58:01 +0900 (Mon, 25 Aug 2008) New Revision: 18842 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18842 Log: * win32.c (init_stdhandle): set binmode. Modified files: trunk/ChangeLog trunk/win32/win32.c Index: ChangeLog =================================================================== --- ChangeLog (revision 18841) +++ ChangeLog (revision 18842) @@ -1,3 +1,7 @@ +Mon Aug 25 23:56:42 2008 NAKAMURA Usaku <usa@r...> + + * win32.c (init_stdhandle): set binmode. + Mon Aug 25 23:38:17 2008 Tadayoshi Funaba <tadf@d...> * lib/date/format.rb(strftime): can print with given arbitrary Index: win32/win32.c =================================================================== --- win32/win32.c (revision 18841) +++ win32/win32.c (revision 18842) @@ -1796,12 +1796,21 @@ if (fileno(stdin) < 0) { stdin->_file = open_null(0); } + else { + setmode(fileno(stdin), O_BINARY); + } if (fileno(stdout) < 0) { stdout->_file = open_null(1); } + else { + setmode(fileno(stdout), O_BINARY); + } if (fileno(stderr) < 0) { stderr->_file = open_null(2); } + else { + setmode(fileno(stderr), O_BINARY); + } if (nullfd >= 0 && !keep) close(nullfd); setvbuf(stderr, NULL, _IONBF, 0); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/