summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--configure.in2
-rw-r--r--file.c2
-rw-r--r--version.h2
4 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index a6fc52de985..73e61628625 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Jun 15 19:07:41 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (ftruncate): check if available.
+
+ * file.c (rb_file_truncate): check if ftruncate instead of truncate.
+
Sun Jun 15 18:59:04 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (sigsetmask): check when signal semantics is not POSIX.
diff --git a/configure.in b/configure.in
index c1195e2fecb..e31a6fec493 100644
--- a/configure.in
+++ b/configure.in
@@ -481,7 +481,7 @@ AC_REPLACE_FUNCS(dup2 memmove strcasecmp strncasecmp strerror strftime\
strchr strstr strtoul crypt flock vsnprintf\
isnan finite isinf hypot acosh erf)
AC_CHECK_FUNCS(fmod killpg wait4 waitpid syscall chroot fsync getcwd eaccess\
- truncate chsize times utimes fcntl lockf lstat symlink link\
+ truncate ftruncate chsize times utimes fcntl lockf lstat symlink link\
readlink setitimer setruid seteuid setreuid setresuid\
setproctitle setrgid setegid setregid setresgid issetugid pause\
lchown lchmod getpgrp setpgrp getpgid setpgid initgroups\
diff --git a/file.c b/file.c
index f5e9a9b9ed2..e92dd7962ba 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
diff --git a/version.h b/version.h
index b8b3a16e050..f5cf4f93941 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-06-15"
#define RUBY_VERSION_CODE 185
#define RUBY_RELEASE_CODE 20080615
-#define RUBY_PATCHLEVEL 176
+#define RUBY_PATCHLEVEL 177
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8