1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
shyouhei 2008-06-15 10:11:35 +00:00
parent 64f4114c2e
commit f08d1b2ee8
4 changed files with 9 additions and 3 deletions

View file

@ -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.

View file

@ -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\

2
file.c
View file

@ -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

View file

@ -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