Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: 3.1.5-pws-12: getcwd
- X-seq: zsh-workers 5815
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>
- To: "Zsh hackers list" <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Re: PATCH: 3.1.5-pws-12: getcwd
- Date: Mon, 15 Mar 1999 13:32:34 +0100
- In-reply-to: ""Andrej Borsenkow""'s message of "Mon, 15 Mar 1999 14:43:34 NFT." <002201be6ed9$0e804b00$21c9ca95@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
"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 <pws@xxxxxxxxxxxxxxxxx> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
Messages sorted by:
Reverse Date,
Date,
Thread,
Author