summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-01-25 13:30:11 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-01-25 13:30:11 +0000
commit9dbd66857aefaa9fa1978d02c23f3cb9d83bc6cb (patch)
treefef5effd6da3e90993a4aad4ca55e28c5a5b1abe
parent224033aac997e28f38a7c679b8f6d8ad952fee3d (diff)
downloadruby-9dbd66857aefaa9fa1978d02c23f3cb9d83bc6cb.tar.gz
ruby-9dbd66857aefaa9fa1978d02c23f3cb9d83bc6cb.tar.xz
ruby-9dbd66857aefaa9fa1978d02c23f3cb9d83bc6cb.zip
* configure.in, dln.c, file.c, intern.h, missing.h (eaccess): use
system routine if provided. fixed: [ruby-core:07195] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--configure.in2
-rw-r--r--dln.c2
-rw-r--r--file.c2
-rw-r--r--intern.h1
-rw-r--r--missing.h4
6 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 1b1f5b56b..d1d201d70 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jan 25 22:29:04 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in, dln.c, file.c, intern.h, missing.h (eaccess): use
+ system routine if provided. fixed: [ruby-core:07195]
+
Sun Jan 22 23:27:13 2006 Go Noguchi <gonoguti@yahoo.co.jp>
* lib/test/unit/autorunner.rb (process_args): ignore arguments after
diff --git a/configure.in b/configure.in
index 845675260..f13a2f4ad 100644
--- a/configure.in
+++ b/configure.in
@@ -437,7 +437,7 @@ AC_CHECK_FUNCS(ftello)
AC_REPLACE_FUNCS(dup2 memmove 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\
+AC_CHECK_FUNCS(fmod killpg wait4 waitpid syscall chroot fsync getcwd eaccess\
truncate chsize times utimes fcntl lockf lstat symlink link\
readlink setitimer setruid seteuid setreuid setresuid\
setproctitle setrgid setegid setregid setresgid issetugid pause\
diff --git a/dln.c b/dln.c
index 65ed4507a..a54401a35 100644
--- a/dln.c
+++ b/dln.c
@@ -89,8 +89,6 @@ char *getenv();
# include <image.h>
#endif
-int eaccess();
-
#ifndef NO_DLN_LOAD
#if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) && !defined(__APPLE__) && !defined(_UNICOSMP)
diff --git a/file.c b/file.c
index aab0afc2d..698172a3f 100644
--- a/file.c
+++ b/file.c
@@ -849,6 +849,7 @@ group_member(gid)
# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
#endif
+#ifndef HAVE_EACCESS
int
eaccess(path, mode)
const char *path;
@@ -890,6 +891,7 @@ eaccess(path, mode)
return access(path, mode);
#endif
}
+#endif
/*
diff --git a/intern.h b/intern.h
index 3a504d8ed..c38c00174 100644
--- a/intern.h
+++ b/intern.h
@@ -221,7 +221,6 @@ VALUE rb_thread_local_aset _((VALUE, ID, VALUE));
void rb_thread_atfork _((void));
VALUE rb_funcall_rescue __((VALUE, ID, int, ...));
/* file.c */
-int eaccess _((const char*, int));
VALUE rb_file_s_expand_path _((int, VALUE *));
VALUE rb_file_expand_path _((VALUE, VALUE));
void rb_file_const _((const char*, VALUE));
diff --git a/missing.h b/missing.h
index a4616950e..3f5607825 100644
--- a/missing.h
+++ b/missing.h
@@ -39,6 +39,10 @@ extern char *crypt _((char *, char *));
extern int dup2 _((int, int));
#endif
+#ifndef HAVE_EACCESS
+extern int eaccess _((const char*, int));
+#endif
+
#ifndef HAVE_FINITE
extern int finite _((double));
#endif