summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-25 16:30:43 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-25 16:30:43 +0000
commit5c6d113a4b58a3b4c01301ac8371378dbdb81dd0 (patch)
treed1ad3dc18d08e4bedb9150ef29cfc68ef694991a
parent873987f2e0796e04ca0ac0aed885137f8e523338 (diff)
* io.c: force CRLF handling if RUBY_TEST_CRLF_ENVIRONMENT is defined.
This is only for testing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--io.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index cf4a6d5433..bd1bf17e68 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Aug 26 01:29:26 2008 Tanaka Akira <akr@fsij.org>
+
+ * io.c: force CRLF handling if RUBY_TEST_CRLF_ENVIRONMENT is defined.
+ This is only for testing.
+
Tue Aug 26 01:26:31 2008 Tanaka Akira <akr@fsij.org>
* transcode.c (str_transcode0): disable newline conversion for ASCII
diff --git a/io.c b/io.c
index b06016d091..2fba88e088 100644
--- a/io.c
+++ b/io.c
@@ -674,7 +674,7 @@ rb_io_wait_writable(int f)
}
/* xxx: better way to determine the newline of the platform? */
-#if defined(O_BINARY) && O_BINARY != 0
+#if defined(RUBY_TEST_CRLF_ENVIRONMENT) || defined(O_BINARY) && O_BINARY != 0
/* Windows */
# define NEED_NEWLINE_DECODER(fptr) (!(fptr->mode & FMODE_BINMODE))
# define NEED_NEWLINE_ENCODER(fptr) (!(fptr->mode & FMODE_BINMODE))