diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-15 05:31:13 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-15 05:31:13 +0000 |
commit | 660a8353b37cada5c6d72f1bbc26f192f50edd93 (patch) | |
tree | fb3fbcd37838efc7b86489beb4a43d2804f8b55b | |
parent | 7d01adb6a42cef19df76bae1cb9492b544305bfc (diff) | |
download | ruby-660a8353b37cada5c6d72f1bbc26f192f50edd93.tar.gz |
* file.c (rb_file_s_truncate): remove unnecessary WIN32 specific code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/win32-unicode-test@25346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | file.c | 6 |
2 files changed, 4 insertions, 6 deletions
@@ -1,3 +1,7 @@ +Thu Oct 15 14:30:39 2009 NAKAMURA Usaku <usa@ruby-lang.org> + + * file.c (rb_file_s_truncate): remove unnecessary WIN32 specific code. + Thu Oct 15 14:16:04 2009 NAKAMURA Usaku <usa@ruby-lang.org> * file.c (rb_str_encode_ospath): use UTF-8 instead of UTF-16LE as @@ -3524,15 +3524,9 @@ rb_file_s_truncate(VALUE klass, VALUE path, VALUE len) { int tmpfd; -# ifdef _WIN32 - if ((tmpfd = rb_w32_wopen((WCHAR *)RSTRING_PTR(path), O_RDWR)) < 0) { - rb_sys_fail(RSTRING_PTR(path)); - } -# else if ((tmpfd = open(RSTRING_PTR(path), 0)) < 0) { rb_sys_fail(RSTRING_PTR(path)); } -# endif if (chsize(tmpfd, pos) < 0) { close(tmpfd); rb_sys_fail(RSTRING_PTR(path)); |