From 38ceb49b79cbc623efe3b4844faa2a26078d3b08 Mon Sep 17 00:00:00 2001 From: eban Date: Wed, 12 Mar 2003 07:59:28 +0000 Subject: [PATCH] * io.c (prep_stdio): set binmode only if the file descriptor is not connected to a terminal on Cygwin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ io.c | 6 ++++-- version.h | 6 +++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index e575410175..2409048a82 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Mar 12 16:48:19 2003 WATANABE Hirofumi + + * io.c (prep_stdio): set binmode only if the file descriptor + is not connected to a terminal on Cygwin. + Tue Mar 11 21:00:59 2003 Minero Aoki * lib/net/smtp.rb: Digest string wrongly included '\n' when user diff --git a/io.c b/io.c index af370ddeb4..12c60482fc 100644 --- a/io.c +++ b/io.c @@ -2792,8 +2792,10 @@ prep_stdio(f, mode, klass) MakeOpenFile(io, fp); #ifdef __CYGWIN__ - mode |= O_BINARY; - setmode(fileno(f), O_BINARY); + if (!isatty(fileno(f))) { + mode |= O_BINARY; + setmode(fileno(f), O_BINARY); + } #endif fp->f = f; fp->mode = mode; diff --git a/version.h b/version.h index 1a4972ba7e..93e2edb8f8 100644 --- a/version.h +++ b/version.h @@ -1,11 +1,11 @@ #define RUBY_VERSION "1.8.0" -#define RUBY_RELEASE_DATE "2003-03-11" +#define RUBY_RELEASE_DATE "2003-03-12" #define RUBY_VERSION_CODE 180 -#define RUBY_RELEASE_CODE 20030311 +#define RUBY_RELEASE_CODE 20030312 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 #define RUBY_VERSION_TEENY 0 #define RUBY_RELEASE_YEAR 2003 #define RUBY_RELEASE_MONTH 03 -#define RUBY_RELEASE_DAY 11 +#define RUBY_RELEASE_DAY 12