summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
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))