summaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorsiena <siena@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-21 16:09:40 +0000
committersiena <siena@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-21 16:09:40 +0000
commita065f0e575b2b45eb7dc6709bb06697fea99b1dd (patch)
treeb412040552759e85d53b7542d077ca5786f5a053 /file.c
parent83f7f66588b0ad6fb1dd5189ab4dfd066ecd3488 (diff)
downloadruby-a065f0e575b2b45eb7dc6709bb06697fea99b1dd.tar.gz
ruby-a065f0e575b2b45eb7dc6709bb06697fea99b1dd.tar.xz
ruby-a065f0e575b2b45eb7dc6709bb06697fea99b1dd.zip
* configure.in: check availability of link(). [ruby-dev:22237]
* file.c (rb_file_s_link): raise an exception when link() is unavailable. * missing/os2.c (link): removed. File#link isn't supported. * bcc32/Makefile.sub: define HAVE_LINK to enable link(). [ruby-dev:22241] * win32/Makefile.sub: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/file.c b/file.c
index 985fdc19a..0b6a0c3fb 100644
--- a/file.c
+++ b/file.c
@@ -1925,6 +1925,7 @@ static VALUE
rb_file_s_link(klass, from, to)
VALUE klass, from, to;
{
+#ifdef HAVE_LINK
SafeStringValue(from);
SafeStringValue(to);
@@ -1932,6 +1933,10 @@ rb_file_s_link(klass, from, to)
sys_fail2(from, to);
}
return INT2FIX(0);
+#else
+ rb_notimplement();
+ return Qnil; /* not reached */
+#endif
}
/*