summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-25 16:49:31 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-25 16:49:31 +0000
commit08911df3117cb9cf6625117c1c6a109cff64b1ad (patch)
tree40aba2c4aa0d52080d46196864d10bf36026323f
parent5c6d113a4b58a3b4c01301ac8371378dbdb81dd0 (diff)
* io.c: test _WIN32 for CRLF platform. (cygwin defines O_BINARY.)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--io.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index bd1bf17e68..85f1b0bd7b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Aug 26 01:48:31 2008 Tanaka Akira <akr@fsij.org>
+
+ * io.c: test _WIN32 for CRLF platform. (cygwin defines O_BINARY.)
+
Tue Aug 26 01:29:26 2008 Tanaka Akira <akr@fsij.org>
* io.c: force CRLF handling if RUBY_TEST_CRLF_ENVIRONMENT is defined.
diff --git a/io.c b/io.c
index 2fba88e088..d1d350e10e 100644
--- a/io.c
+++ b/io.c
@@ -673,8 +673,7 @@ rb_io_wait_writable(int f)
}
}
-/* xxx: better way to determine the newline of the platform? */
-#if defined(RUBY_TEST_CRLF_ENVIRONMENT) || defined(O_BINARY) && O_BINARY != 0
+#if defined(RUBY_TEST_CRLF_ENVIRONMENT) || defined(_WIN32)
/* Windows */
# define NEED_NEWLINE_DECODER(fptr) (!(fptr->mode & FMODE_BINMODE))
# define NEED_NEWLINE_ENCODER(fptr) (!(fptr->mode & FMODE_BINMODE))