summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-11-23 02:06:00 +0000
committerocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-11-23 02:06:00 +0000
commit2cb3480d2247a3b8b4f33c89d3153f16dcf39413 (patch)
tree01e20090977acc38556ef48e7ccd9d106d178e22 /file.c
parentb54ab5610b81bdaacead8148e6a4e5b41ed50ea4 (diff)
* intern.h, file.c: failed to compile on windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/file.c b/file.c
index 3969d85..ef73ffb 100644
--- a/file.c
+++ b/file.c
@@ -676,10 +676,10 @@ w32_io_info(file, st)
OpenFile *fptr;
GetOpenFile(tmp, fptr);
- f = (HANDLE)rb_w32_get_osfhandle(fptr->fd);
+ f = (HANDLE)rb_w32_get_osfhandle(fileno(fptr->f));
}
else {
- FilePathValue(*file);
+ SafeStringValue(*file);
f = CreateFile(StringValueCStr(*file), 0, 0, NULL,
OPEN_EXISTING, 0, NULL);
if (f == INVALID_HANDLE_VALUE) return f;
@@ -1427,9 +1427,9 @@ test_identical(obj, fname1, fname2)
if (!f1 || !f2) return Qfalse;
if (rb_w32_iswin95()) return Qfalse;
#else
- FilePathValue(fname1);
+ SafeStringValue(fname1);
fname1 = rb_str_new4(fname1);
- FilePathValue(fname2);
+ SafeStringValue(fname2);
if (access(RSTRING(fname1)->ptr, 0)) return Qfalse;
if (access(RSTRING(fname2)->ptr, 0)) return Qfalse;
#endif