From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27686 invoked from network); 15 Mar 1999 12:51:24 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 15 Mar 1999 12:51:24 -0000 Received: (qmail 23396 invoked by alias); 15 Mar 1999 12:51:00 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5815 Received: (qmail 23388 invoked from network); 15 Mar 1999 12:50:58 -0000 Message-Id: <9903151232.AA16317@ibmth.df.unipi.it> To: "Zsh hackers list" Subject: Re: PATCH: 3.1.5-pws-12: getcwd In-Reply-To: ""Andrej Borsenkow""'s message of "Mon, 15 Mar 1999 14:43:34 NFT." <002201be6ed9$0e804b00$21c9ca95@mowp.siemens.ru> Date: Mon, 15 Mar 1999 13:32:34 +0100 From: Peter Stephenson "Andrej Borsenkow" wrote: > What is wrong with native getcwd? (Apart, that it may use native malloc() to > allocate buffer)? If there are any known problems, is it possible to write a > configure check for them? The only problem I can see is that getcwd() is passed a fixed buffer size which won't get reallocated if it's too small (the default is PATH_MAX which should normally be enough), and there's no way to tell it to get as much as it needs --- it always seems to use the size argument. This could be fixed by checking for an ERANGE and reallocating. There's no record of problems with real getcwd()s in the source, but I don't think it was used at all till recently. Currently configure doesn't even check for getcwd(). Does anyone know more? -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy