mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* io.c (rb_io_tell, rb_io_seek): check errno too. [ruby-dev:32093]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@13774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ae8bb3a00c
commit
42cff90a29
3 changed files with 10 additions and 5 deletions
|
|
@ -1,3 +1,7 @@
|
|||
Thu Oct 25 14:19:33 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* io.c (rb_io_tell, rb_io_seek): check errno too. [ruby-dev:32093]
|
||||
|
||||
Wed Oct 25 08:03:53 2007 James Edward Gray II <jeg2@ruby-lang.org>
|
||||
|
||||
Merged 13767, 13768, 13769, and 13770 from trunk.
|
||||
|
|
|
|||
5
io.c
5
io.c
|
|
@ -245,6 +245,7 @@ flush_before_seek(fptr)
|
|||
if (fptr->mode & FMODE_WBUF) {
|
||||
io_fflush(GetWriteFile(fptr), fptr);
|
||||
}
|
||||
errno = 0;
|
||||
return fptr;
|
||||
}
|
||||
|
||||
|
|
@ -668,7 +669,7 @@ rb_io_tell(io)
|
|||
|
||||
GetOpenFile(io, fptr);
|
||||
pos = io_tell(fptr);
|
||||
if (pos < 0) rb_sys_fail(fptr->path);
|
||||
if (pos < 0 && errno) rb_sys_fail(fptr->path);
|
||||
return OFFT2NUM(pos);
|
||||
}
|
||||
|
||||
|
|
@ -683,7 +684,7 @@ rb_io_seek(io, offset, whence)
|
|||
pos = NUM2OFFT(offset);
|
||||
GetOpenFile(io, fptr);
|
||||
pos = io_seek(fptr, pos, whence);
|
||||
if (pos < 0) rb_sys_fail(fptr->path);
|
||||
if (pos < 0 && errno) rb_sys_fail(fptr->path);
|
||||
clearerr(fptr->f);
|
||||
|
||||
return INT2FIX(0);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#define RUBY_VERSION "1.8.6"
|
||||
#define RUBY_RELEASE_DATE "2007-10-21"
|
||||
#define RUBY_RELEASE_DATE "2007-10-25"
|
||||
#define RUBY_VERSION_CODE 186
|
||||
#define RUBY_RELEASE_CODE 20071021
|
||||
#define RUBY_RELEASE_CODE 20071025
|
||||
#define RUBY_PATCHLEVEL 5000
|
||||
|
||||
#define RUBY_VERSION_MAJOR 1
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
#define RUBY_VERSION_TEENY 6
|
||||
#define RUBY_RELEASE_YEAR 2007
|
||||
#define RUBY_RELEASE_MONTH 10
|
||||
#define RUBY_RELEASE_DAY 21
|
||||
#define RUBY_RELEASE_DAY 25
|
||||
|
||||
#ifdef RUBY_EXTERN
|
||||
RUBY_EXTERN const char ruby_version[];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue