From 3e5dc499a8b5629154c791f1497b146d102902aa Mon Sep 17 00:00:00 2001 From: usa Date: Mon, 2 May 2016 14:05:19 +0000 Subject: * win32/win32.c, include/ruby/win32.h (rb_w32_utruncate): implements new truncate alternative which accepts UTF-8 path. * file.c (truncate): use above function. [Bug #12340] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/win32.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/ruby') diff --git a/include/ruby/win32.h b/include/ruby/win32.h index 47f68b8cb2..68b8db73e6 100644 --- a/include/ruby/win32.h +++ b/include/ruby/win32.h @@ -403,8 +403,9 @@ __declspec(dllimport) extern int finite(double); #define SUFFIX -extern int rb_w32_ftruncate(int fd, off_t length); -extern int rb_w32_truncate(const char *path, off_t length); +extern int rb_w32_ftruncate(int fd, off_t length); +extern int rb_w32_truncate(const char *path, off_t length); +extern int rb_w32_utruncate(const char *path, off_t length); #undef HAVE_FTRUNCATE #define HAVE_FTRUNCATE 1 -- cgit v1.2.3