mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* io.c (prep_stdio, Init_io): always set binmode on Cygwin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f2d07eb82d
commit
2f7275db77
3 changed files with 24 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
|||
Sun Feb 16 03:14:33 2003 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||
|
||||
* io.c (prep_stdio, Init_io): always set binmode on Cygwin.
|
||||
|
||||
Sat Feb 15 01:01:45 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
|
||||
* file.c (file_expand_path): fix surplus path separators while
|
||||
|
|
17
io.c
17
io.c
|
@ -2783,6 +2783,10 @@ prep_stdio(f, mode, klass)
|
|||
VALUE io = io_alloc(klass);
|
||||
|
||||
MakeOpenFile(io, fp);
|
||||
#ifdef __CYGWIN__
|
||||
mode |= O_BINARY;
|
||||
setmode(fileno(f), O_BINARY);
|
||||
#endif
|
||||
fp->f = f;
|
||||
fp->mode = mode;
|
||||
|
||||
|
@ -3894,6 +3898,19 @@ opt_i_set(val)
|
|||
void
|
||||
Init_IO()
|
||||
{
|
||||
#ifdef __CYGWIN__
|
||||
#include <sys/cygwin.h>
|
||||
static struct __cygwin_perfile pf[] =
|
||||
{
|
||||
{"", O_RDONLY | O_BINARY},
|
||||
{"", O_WRONLY | O_BINARY},
|
||||
{"", O_RDWR | O_BINARY},
|
||||
{"", O_APPEND | O_BINARY},
|
||||
{NULL, 0}
|
||||
};
|
||||
cygwin_internal(CW_PERFILE, pf);
|
||||
#endif
|
||||
|
||||
rb_eIOError = rb_define_class("IOError", rb_eStandardError);
|
||||
rb_eEOFError = rb_define_class("EOFError", rb_eIOError);
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#define RUBY_VERSION "1.8.0"
|
||||
#define RUBY_RELEASE_DATE "2003-02-13"
|
||||
#define RUBY_RELEASE_DATE "2003-02-16"
|
||||
#define RUBY_VERSION_CODE 180
|
||||
#define RUBY_RELEASE_CODE 20030213
|
||||
#define RUBY_RELEASE_CODE 20030216
|
||||
|
||||
#define RUBY_VERSION_MAJOR 1
|
||||
#define RUBY_VERSION_MINOR 8
|
||||
#define RUBY_VERSION_TEENY 0
|
||||
#define RUBY_RELEASE_YEAR 2003
|
||||
#define RUBY_RELEASE_MONTH 02
|
||||
#define RUBY_RELEASE_DAY 13
|
||||
#define RUBY_RELEASE_DAY 16
|
||||
|
|
Loading…
Reference in a new issue