94 lines
2.9 KiB
Diff
94 lines
2.9 KiB
Diff
see bug:
|
|
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=3317&group_id=426
|
|
|
|
adapted patch from:
|
|
http://www.atdot.net/~ko1/w3ml/w3ml.cgi/ruby-cvs/msg/16358
|
|
|
|
|
|
Index: ChangeLog
|
|
===================================================================
|
|
--- ChangeLog.orig
|
|
+++ 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]
|
|
+
|
|
Sat Dec 24 18:58:14 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
|
|
|
|
* stable version 1.8.4 released.
|
|
Index: configure.in
|
|
===================================================================
|
|
--- configure.in.orig
|
|
+++ 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\
|
|
Index: dln.c
|
|
===================================================================
|
|
--- dln.c.orig
|
|
+++ 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)
|
|
Index: file.c
|
|
===================================================================
|
|
--- file.c.orig
|
|
+++ file.c
|
|
@@ -849,6 +849,7 @@ group_member(gid)
|
|
# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
|
|
#endif
|
|
|
|
+#if !defined(HAVE_EACCESS) || !(defined(__USE_GNU) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 4))
|
|
int
|
|
eaccess(path, mode)
|
|
const char *path;
|
|
@@ -887,6 +888,7 @@ eaccess(path, mode)
|
|
return access(path, mode);
|
|
#endif
|
|
}
|
|
+#endif
|
|
|
|
|
|
/*
|
|
Index: intern.h
|
|
===================================================================
|
|
--- intern.h.orig
|
|
+++ intern.h
|
|
@@ -221,7 +221,6 @@ VALUE rb_thread_local_aset _((VALUE, ID,
|
|
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));
|
|
Index: missing.h
|
|
===================================================================
|
|
--- missing.h.orig
|
|
+++ missing.h
|
|
@@ -39,6 +39,10 @@ extern char *crypt _((char *, char *));
|
|
extern int dup2 _((int, int));
|
|
#endif
|
|
|
|
+#if !defined(HAVE_EACCESS) || !(defined(__USE_GNU) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 4))
|
|
+extern int eaccess(const char*, int);
|
|
+#endif
|
|
+
|
|
#ifndef HAVE_FINITE
|
|
extern int finite _((double));
|
|
#endif
|