From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23197 invoked from network); 4 Aug 2000 13:20:44 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 4 Aug 2000 13:20:44 -0000 Received: (qmail 1281 invoked by alias); 4 Aug 2000 13:20:08 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12529 Received: (qmail 1237 invoked from network); 4 Aug 2000 13:20:06 -0000 Date: Fri, 4 Aug 2000 09:19:55 -0400 From: Clint Adams To: Bart Schaefer Cc: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: pathconf() again Message-ID: <20000804091955.A4368@dman.com> References: <1000804070216.ZM23696@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.1.2i In-Reply-To: <1000804070216.ZM23696@candle.brasslantern.com>; from schaefer@candle.brasslantern.com on Fri, Aug 04, 2000 at 07:02:16AM +0000 > Random questions: Can someone explain how one is supposed to determine a > useful buffer size for e.g. readlink() if pathconf() returns `unlimited'? What I was told is that one should malloc an arbitrary amount, say 512 bytes, then realloc to double the buffer size if it's too small. Rinse and repeat. > For that matter, how does one even know what directory name to pass into > pathconf() in that case? I assume you want the PATH_MAX of the filesystem where the link lives, and not the psychically-determined filesystem to which it's pointing.