mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@5532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6ccba894a5
commit
357d0ffc29
6 changed files with 18 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
|||
Thu Jan 22 00:33:52 2004 Siena. <siena@faculty.chiba-u.jp>
|
||||
|
||||
* 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.
|
||||
|
||||
Thu Jan 22 00:26:25 2004 Siena. <siena@faculty.chiba-u.jp>
|
||||
|
||||
* ChangeLog: typo: RUBY_MBCHAR_MAX was RUBY_MBCHAR_MAXSIZE.
|
||||
|
|
|
@ -246,6 +246,7 @@ config.h:
|
|||
\#define HAVE_TIMES 1
|
||||
/* \#define HAVE_UTIMES 1 */
|
||||
/* \#define HAVE_FCNTL 1 */
|
||||
\#define HAVE_LINK 1
|
||||
/* \#define HAVE_SETITIMER 1 */
|
||||
/* \#define HAVE_GETGROUPS 1 */
|
||||
/* \#define HAVE_SIGPROCMASK 1 */
|
||||
|
|
|
@ -390,7 +390,7 @@ AC_REPLACE_FUNCS(dup2 memmove mkdir strcasecmp strncasecmp strerror strftime\
|
|||
strchr strstr strtoul crypt flock vsnprintf\
|
||||
isnan finite isinf hypot acosh erf)
|
||||
AC_CHECK_FUNCS(fmod killpg wait4 waitpid syscall chroot fsync getcwd\
|
||||
truncate chsize times utimes fcntl lockf lstat symlink readlink\
|
||||
truncate chsize times utimes fcntl lockf lstat link symlink readlink\
|
||||
setitimer setruid seteuid setreuid setresuid setproctitle\
|
||||
setrgid setegid setregid setresgid issetugid pause lchown lchmod\
|
||||
getpgrp setpgrp getpgid setpgid initgroups getgroups setgroups\
|
||||
|
|
5
file.c
5
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
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -17,11 +17,13 @@ chown(char *path, int owner, int group)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
int
|
||||
link(char *from, char *to)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef char* CHARP;
|
||||
|
||||
|
|
|
@ -270,6 +270,7 @@ config.h:
|
|||
#define HAVE_FSYNC 1
|
||||
#define HAVE_CHSIZE 1
|
||||
#define HAVE_TIMES 1
|
||||
#define HAVE_LINK 1
|
||||
#define HAVE__SETJMP 1
|
||||
#define HAVE_TELLDIR 1
|
||||
#define HAVE_SEEKDIR 1
|
||||
|
|
Loading…
Add table
Reference in a new issue