summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-15 05:31:13 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-15 05:31:13 +0000
commit660a8353b37cada5c6d72f1bbc26f192f50edd93 (patch)
treefb3fbcd37838efc7b86489beb4a43d2804f8b55b
parent7d01adb6a42cef19df76bae1cb9492b544305bfc (diff)
downloadruby-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--ChangeLog4
-rw-r--r--file.c6
2 files changed, 4 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index b90805e17b..9e45df6cd9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/file.c b/file.c
index ec83cc6f0c..10f4618690 100644
--- a/file.c
+++ b/file.c
@@ -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));