mirror of
https://github.com/ruby/ruby.git
synced 2025-09-19 02:23:59 +02:00
merges r31262 and r31264 from trunk into ruby_1_9_2.
-- Evaluate truncate, ftruncate and ftello existence This corrects mingw-w64 compilation. -- * include/ruby/win32.h: VC doesn't have ftruncate() and others, but ruby needs HAVE_ macros to use our emulation functions. (fix the problem of 31262) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@31798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7ffffab236
commit
d4e840bf26
5 changed files with 34 additions and 10 deletions
|
@ -4332,7 +4332,7 @@ rb_chsize(HANDLE h, off_t size)
|
|||
}
|
||||
|
||||
int
|
||||
truncate(const char *path, off_t length)
|
||||
rb_w32_truncate(const char *path, off_t length)
|
||||
{
|
||||
HANDLE h;
|
||||
int ret;
|
||||
|
@ -4358,7 +4358,7 @@ truncate(const char *path, off_t length)
|
|||
}
|
||||
|
||||
int
|
||||
ftruncate(int fd, off_t length)
|
||||
rb_w32_ftruncate(int fd, off_t length)
|
||||
{
|
||||
HANDLE h;
|
||||
|
||||
|
@ -4431,7 +4431,7 @@ fseeko(FILE *stream, off_t offset, int whence)
|
|||
}
|
||||
|
||||
off_t
|
||||
ftello(FILE *stream)
|
||||
rb_w32_ftello(FILE *stream)
|
||||
{
|
||||
off_t pos;
|
||||
if (fgetpos(stream, (fpos_t *)&pos)) return (off_t)-1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue