diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-10 18:24:25 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-10 18:24:25 +0000 |
commit | 773b80bf36dec581cfbbb5a522529b7ec9afd82a (patch) | |
tree | febdf6a1e80471da55ca85dc67799c5cb7eb5a20 /include | |
parent | 093ade0eb8229673f4985a3c9a1eadc191f9e533 (diff) |
merge revision(s) 33937: [Backport #5704]
* ext/zlib/zlib.c (rb_gzreader_initialize): use binary mode by default
under Windows. Patch by Hiroshi Shirosaki. [ruby-core:40706]
[Feature #5562]
* include/ruby/encoding.h (void rb_econv_binmode): define NEWLINE
decorator.
* io.c (rb_cloexec_fcntl_dupfd): Introduce NEED_READCONV and
NEED_WRITECONV to replace universal newline decorator by CRLF only
when required to improve file reading and writing under Windows.
Patch by Hiroshi Shirosaki. [ruby-core:40706] [Feature #5562]
* io.c (do_writeconv): adjust binary mode if required.
* io.c (read_all, appendline, swallow, rb_io_getline_1): ditto.
* io.c (io_getc, rb_io_each_codepoint, rb_io_ungetc): ditto.
* io.c (rb_io_binmode, rb_io_ascii8bit_binmode): ditto.
* io.c (rb_io_extract_modeenc, rb_sysopen): ditto.
* io.c (pipe_open, prep_stdio, io_encoding_set): ditto.
* io.c (rb_io_s_pipe, copy_stream_body): ditto.
* test/ruby/test_io_m17n.rb (EOT): add test for pipe and stdin in
binary mode.
* win32/win32.c (init_stdhandle): remove O_BINARY from stdhandle
initialization.
* win32/win32.c (rb_w32_write): use FTEXT mode accordingly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/encoding.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h index 4a046af136..058462fd24 100644 --- a/include/ruby/encoding.h +++ b/include/ruby/encoding.h @@ -318,7 +318,7 @@ void rb_econv_binmode(rb_econv_t *ec); #define ECONV_XML_ATTR_QUOTE_DECORATOR 0x00100000 #if defined(RUBY_TEST_CRLF_ENVIRONMENT) || defined(_WIN32) -#define ECONV_DEFAULT_NEWLINE_DECORATOR ECONV_UNIVERSAL_NEWLINE_DECORATOR +#define ECONV_DEFAULT_NEWLINE_DECORATOR ECONV_CRLF_NEWLINE_DECORATOR #else #define ECONV_DEFAULT_NEWLINE_DECORATOR 0 #endif |