summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-15 10:11:35 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-15 10:11:35 +0000
commitf08d1b2ee827bb23036d238580c15a1f92dbf233 (patch)
tree64e7a5fef3907a4f307725b3d7a28cc3fde2f166 /file.c
parent64f4114c2e5a164b5cb39976ddfac16ebb8f768c (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_5@17171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/file.c b/file.c
index f5e9a9b9ed..e92dd7962b 100644
--- a/file.c
+++ b/file.c
@@ -3245,7 +3245,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