From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6699 invoked from network); 26 Mar 2008 15:44:02 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 26 Mar 2008 15:44:02 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 7942 invoked from network); 26 Mar 2008 15:43:58 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 26 Mar 2008 15:43:58 -0000 Received: (qmail 9935 invoked by alias); 26 Mar 2008 15:43:55 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24745 Received: (qmail 9917 invoked from network); 26 Mar 2008 15:43:54 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 26 Mar 2008 15:43:54 -0000 Received: from cluster-d.mailcontrol.com (cluster-d.mailcontrol.com [217.69.20.190]) by bifrost.dotsrc.org (Postfix) with ESMTP id 4558D8097826 for ; Wed, 26 Mar 2008 16:43:47 +0100 (CET) Received: from rly10d.srv.mailcontrol.com (localhost.localdomain [127.0.0.1]) by rly10d.srv.mailcontrol.com (MailControl) with ESMTP id m2QFhgoG018352 for ; Wed, 26 Mar 2008 15:43:42 GMT Received: from submission.mailcontrol.com (submission.mailcontrol.com [86.111.216.190]) by rly10d.srv.mailcontrol.com (MailControl) id m2QFgvPP011604 for zsh-workers@sunsite.dk; Wed, 26 Mar 2008 15:42:57 GMT Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly10d-eth0.srv.mailcontrol.com (envelope-sender Peter.Stephenson@csr.com) (MIMEDefang) with ESMTP id m2QFgheX009929; Wed, 26 Mar 2008 15:42:57 +0000 (GMT) Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Wed, 26 Mar 2008 15:40:19 +0000 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.14.2/8.13.4) with ESMTP id m2QFeJS3017384; Wed, 26 Mar 2008 15:40:19 GMT Received: from csr.com (pws@localhost) by news01.csr.com (8.14.2/8.14.2/Submit) with ESMTP id m2QFeJmm017381; Wed, 26 Mar 2008 15:40:19 GMT Message-Id: <200803261540.m2QFeJmm017381@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: Baptiste Daroussin , zsh-workers@sunsite.dk Subject: Re: _canonical_path not working on *BSD In-reply-to: <080326083638.ZM16858@torch.brasslantern.com> References: <20080326114413.80713vrmznwpnyuc@bapt.selfip.org> <080326083638.ZM16858@torch.brasslantern.com> Comments: In-reply-to Bart Schaefer message dated "Wed, 26 Mar 2008 08:36:38 -0700." Date: Wed, 26 Mar 2008 15:40:19 +0000 From: Peter Stephenson X-OriginalArrivalTime: 26 Mar 2008 15:40:19.0275 (UTC) FILETIME=[B215A9B0:01C88F57] X-Scanned-By: MailControl A-08-00-04 (www.mailcontrol.com) on 10.68.1.120 X-Virus-Scanned: ClamAV 0.91.2/6396/Wed Mar 26 12:29:12 2008 on bifrost X-Virus-Status: Clean Bart Schaefer wrote: > On Mar 26, 11:44am, Baptiste Daroussin wrote: > } > } _canonical_path is not working on freebsd, it rely on readlink > > Try this. I don't actually have any mount points that are symlink > targets so it's hard to test, but I think this is right: > > -if (( ! $+commands[readlink] )); then > +if ! zmodload -F zsh/stat b:zstat 2>/dev/null; then That's probably a better solution; it doesn't necessarily work on all systems, particularly if the shell is statically linked, but it should be at least as widely applicable as, and easier to test for than, anything involving readlink. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070