51bc637
diff -ruN ruby-1.8.4.orig/configure.in ruby-1.8.4/configure.in
51bc637
--- ruby-1.8.4.orig/configure.in	2005-11-24 21:07:18.000000000 +0900
51bc637
+++ ruby-1.8.4/configure.in	2006-02-06 12:51:58.000000000 +0900
51bc637
@@ -437,7 +437,7 @@
51bc637
 AC_REPLACE_FUNCS(dup2 memmove strcasecmp strncasecmp strerror strftime\
51bc637
 		 strchr strstr strtoul crypt flock vsnprintf\
51bc637
 		 isnan finite isinf hypot acosh erf)
51bc637
-AC_CHECK_FUNCS(fmod killpg wait4 waitpid syscall chroot fsync getcwd\
51bc637
+AC_CHECK_FUNCS(fmod killpg wait4 waitpid syscall chroot fsync getcwd eaccess\
51bc637
 	      truncate chsize times utimes fcntl lockf lstat symlink link\
51bc637
 	      readlink setitimer setruid seteuid setreuid setresuid\
51bc637
 	      setproctitle setrgid setegid setregid setresgid issetugid pause\
51bc637
diff -ruN ruby-1.8.4.orig/file.c ruby-1.8.4/file.c
51bc637
--- ruby-1.8.4.orig/file.c	2005-12-21 18:20:15.000000000 +0900
51bc637
+++ ruby-1.8.4/file.c	2006-02-06 12:52:48.000000000 +0900
51bc637
@@ -849,6 +849,7 @@
51bc637
 #  define S_IXUGO		(S_IXUSR | S_IXGRP | S_IXOTH)
51bc637
 #endif
51bc637
 
51bc637
+#ifndef HAVE_EACCESS
51bc637
 int
51bc637
 eaccess(path, mode)
51bc637
      const char *path;
51bc637
@@ -887,6 +888,7 @@
51bc637
     return access(path, mode);
51bc637
 #endif
51bc637
 }
51bc637
+#endif
51bc637
 
51bc637
 
51bc637
 /*
51bc637
diff -ruN ruby-1.8.4.orig/intern.h ruby-1.8.4/intern.h
51bc637
--- ruby-1.8.4.orig/intern.h	2005-11-23 11:06:00.000000000 +0900
51bc637
+++ ruby-1.8.4/intern.h	2006-02-06 12:52:54.000000000 +0900
51bc637
@@ -221,7 +221,6 @@
51bc637
 void rb_thread_atfork _((void));
51bc637
 VALUE rb_funcall_rescue __((VALUE, ID, int, ...));
51bc637
 /* file.c */
51bc637
-int eaccess _((const char*, int));
51bc637
 VALUE rb_file_s_expand_path _((int, VALUE *));
51bc637
 VALUE rb_file_expand_path _((VALUE, VALUE));
51bc637
 void rb_file_const _((const char*, VALUE));
51bc637
diff -ruN ruby-1.8.4.orig/missing.h ruby-1.8.4/missing.h
51bc637
--- ruby-1.8.4.orig/missing.h	2005-06-13 01:58:41.000000000 +0900
51bc637
+++ ruby-1.8.4/missing.h	2006-02-06 12:53:29.000000000 +0900
51bc637
@@ -39,6 +39,10 @@
51bc637
 extern int dup2 _((int, int));
51bc637
 #endif
51bc637
 
51bc637
+#ifndef HAVE_EACCESS
51bc637
+extern int eaccess(const char*, int);
51bc637
+#endif
51bc637
+
51bc637
 #ifndef HAVE_FINITE
51bc637
 extern int finite _((double));
51bc637
 #endif