diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-04-18 08:46:18 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-04-18 08:46:18 +0000 |
commit | e63a9901412d465cd90143d658fda8fa938d7f8c (patch) | |
tree | 12cf55d22b7b78304e8a692c44217e9531a31c02 /file.c | |
parent | 8a7b08bb787c2d8d531e0b84974fb2a4bec30d87 (diff) |
* re.c (rb_reg_expr_str): should treat backslash specially in
escaping.
* io.c: complete off_t handling; missing argument for
fptr_finalize(); polished rb_scan_args call.
* dir.c: wrap multi-statment macro by do { } while (0)
* eval.c, numeric,c, sprintf.c, util.c: ditto.
* bignum.c (rb_big_eq): check `y == x' if y is neither Fixnum,
Bignum, nor Float.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1678,7 +1678,7 @@ rb_file_s_truncate(klass, path, len) SafeStringValue(path); #ifdef HAVE_TRUNCATE - if (truncate(RSTRING(path)->ptr, NUM2INT(len)) < 0) + if (truncate(RSTRING(path)->ptr, NUM2OFFT(len)) < 0) rb_sys_fail(RSTRING(path)->ptr); #else # ifdef HAVE_CHSIZE @@ -1694,7 +1694,7 @@ rb_file_s_truncate(klass, path, len) rb_sys_fail(RSTRING(path)->ptr); } # endif - if (chsize(tmpfd, NUM2INT(len)) < 0) { + if (chsize(tmpfd, NUM2OFFT(len)) < 0) { close(tmpfd); rb_sys_fail(RSTRING(path)->ptr); } @@ -1719,11 +1719,11 @@ rb_file_truncate(obj, len) rb_raise(rb_eIOError, "not opened for writing"); } #ifdef HAVE_TRUNCATE - if (ftruncate(fileno(fptr->f), NUM2INT(len)) < 0) + if (ftruncate(fileno(fptr->f), NUM2OFFT(len)) < 0) rb_sys_fail(fptr->path); #else # ifdef HAVE_CHSIZE - if (chsize(fileno(fptr->f), NUM2INT(len)) < 0) + if (chsize(fileno(fptr->f), NUM2OFFT(len)) < 0) rb_sys_fail(fptr->path); # else rb_notimplement(); |