summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-18 06:35:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-18 06:35:38 +0000
commit58f97825278b0d45c58aa46d662a3d6b2c99e782 (patch)
treeaebe4929d9a890ed59eae717e4e6d06d158c1373 /file.c
parent30231731a9539e8b3474bd3ffa8e24624ea726d1 (diff)
* file.c (rb_file_chown): use chown unless HAVE_FCHOWN.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/file.c b/file.c
index 69c0c681a3..c0e9e8a77e 100644
--- a/file.c
+++ b/file.c
@@ -1998,7 +1998,7 @@ rb_file_chown(VALUE obj, VALUE owner, VALUE group)
o = NIL_P(owner) ? -1 : NUM2INT(owner);
g = NIL_P(group) ? -1 : NUM2INT(group);
GetOpenFile(obj, fptr);
-#if defined(__CYGWIN32__) || defined(_WIN32) || defined(__EMX__) || defined(__SYMBIAN32__)
+#ifndef HAVE_FCHOWN
if (NIL_P(fptr->pathv)) return Qnil;
if (chown(RSTRING_PTR(fptr->pathv), o, g) == -1)
rb_sys_fail_path(fptr->pathv);