diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-15 10:15:41 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-15 10:15:41 +0000 |
commit | 356a958154e08b232468ab90e6a852e861a0396c (patch) | |
tree | e170278b00596671d8332972a30c58ef76cfc2ea /file.c | |
parent | b862aa9e4abcf5a9fdcc97d5809085d46e05cc39 (diff) |
merge revision(s) 15477:
* configure.in (ftruncate): check if available.
* file.c (rb_file_truncate): check if ftruncate instead of truncate.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3259,7 +3259,7 @@ rb_file_truncate(obj, len) f = GetWriteFile(fptr); fflush(f); fseeko(f, (off_t)0, SEEK_CUR); -#ifdef HAVE_TRUNCATE +#ifdef HAVE_FTRUNCATE if (ftruncate(fileno(f), pos) < 0) rb_sys_fail(fptr->path); #else |