diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-14 17:42:27 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-14 17:42:27 +0000 |
commit | 9e8badfc59eabd65233eb524a727b19774c634c4 (patch) | |
tree | efe9c7149e39c847cb91b70e0bac49ff122b115f /file.c | |
parent | 300264c0e821742c484a3e94258fc4a9c49f6585 (diff) |
* 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@15477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3101,7 +3101,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 |