From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14490 invoked from network); 12 Mar 2000 22:22:58 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 12 Mar 2000 22:22:58 -0000 Received: (qmail 23554 invoked by alias); 12 Mar 2000 22:22:50 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10098 Received: (qmail 23533 invoked from network); 12 Mar 2000 22:22:48 -0000 From: "Bart Schaefer" Message-Id: <1000312222135.ZM31017@candle.brasslantern.com> Date: Sun, 12 Mar 2000 22:21:35 +0000 In-Reply-To: <38CAAF7B.6330EA2B@u.genie.co.uk> Comments: In reply to Oliver Kiddle "PATCH: Re: zsh tests (dev-15)" (Mar 11, 8:41pm) References: <38CAAF7B.6330EA2B@u.genie.co.uk> X-Mailer: Z-Mail (5.0.0 30July97) To: Zsh workers Subject: PATCH: Re: PATCH: Re: zsh tests (dev-15) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Mar 11, 8:41pm, Oliver Kiddle wrote: } Subject: PATCH: Re: zsh tests (dev-15) } } After a quick look at some man pages, it seems that Linux maybe doesn't } have faccessx(). Is this right? Here's a follow-up patch to test for faccessx() and omit Oliver's bit if it isn't found. I've taken the liberty of rearranging the function list for AC_CHECK_FUNCS a bit so that related things are grouped, after a fashion. I've kept the backslash at the end of every line, but are those really necessary? I thought m4 would do the right thing with macro arguments that span multiple lines. Index: configure.in =================================================================== @@ -802,22 +802,33 @@ #include ], struct sockaddr_in6, sin6_scope_id) +dnl --------------- +dnl CHECK FUNCTIONS +dnl --------------- + dnl need to integrate this function dnl AC_FUNC_STRFTIME -AC_CHECK_FUNCS(lchown memcpy memmove \ - strftime waitpid select poll tcsetpgrp tcgetattr strstr lstat \ - getlogin setpgid gettimeofday gethostname mkfifo wait3 difftime \ - sigblock sigsetmask sigrelse sighold killpg sigaction getrlimit \ - sigprocmask setuid seteuid setreuid setresuid setsid strerror \ - nis_list initgroups fchdir cap_get_proc readlink nice \ - getgrgid getgrnam getpwent getpwnam getpwuid setpgrp \ - inet_aton inet_pton inet_ntop getipnodebyname gethostbyname2 \ - fseeko ftello mmap munmap msync ftruncate setlocale _mktemp) +AC_CHECK_FUNCS(strftime difftime gettimeofday \ + select poll \ + readlink lstat lchown faccessx fchdir ftruncate \ + fseeko ftello \ + mkfifo _mktemp \ + waitpid wait3 \ + sigaction sigblock sighold sigrelse sigsetmask sigprocmask \ + killpg setpgid setpgrp tcsetpgrp tcgetattr nice \ + gethostname gethostbyname2 getipnodebyname \ + inet_aton inet_pton inet_ntop \ + getlogin getpwent getpwnam getpwuid getgrgid getgrnam \ + initgroups nis_list \ + setuid seteuid setreuid setresuid setsid \ + memcpy memmove strstr strerror \ + mmap munmap msync \ + cap_get_proc \ + getrlimit \ + setlocale) +AC_FUNC_STRCOLL -dnl --------------- -dnl CHECK FUNCTIONS -dnl --------------- if test $ac_cv_func_setpgrp = yes; then AC_FUNC_GETPGRP else @@ -828,7 +839,6 @@ ac_cv_func_getpgrp_void=yes AC_DEFINE(GETPGRP_VOID) fi -AC_FUNC_STRCOLL if test $dynamic = yes; then AC_CHECK_FUNCS(dlopen dlerror dlsym dlclose load loadquery loadbind unload \ Index: Src/cond.c =================================================================== @@ -310,9 +310,10 @@ static int doaccess(char *s, int c) { +#ifdef HAVE_FACCESSX if (!strncmp(s, "/dev/fd/", 8)) return !faccessx(atoi(s + 8), c, ACC_SELF); - +#endif return !access(unmeta(s), c); } -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com