merge revision(s) 54887-54889: [Backport #12340]

* 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/branches/ruby_2_2@55347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2016-06-10 06:35:57 +00:00
parent d16ff5c412
commit 6dbda00a62
6 changed files with 248 additions and 99 deletions

2
file.c
View file

@ -99,6 +99,8 @@ int flock(int, int);
#define lstat(p, s) rb_w32_ustati64((p), (s))
#undef access
#define access(p, m) rb_w32_uaccess((p), (m))
#undef truncate
#define truncate(p, n) rb_w32_utruncate((p), (n))
#undef chmod
#define chmod(p, m) rb_w32_uchmod((p), (m))
#undef chown