Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: pathconf() again
- X-seq: zsh-workers 12529
- From: Clint Adams <schizo@xxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: PATCH: pathconf() again
- Date: Fri, 4 Aug 2000 09:19:55 -0400
- Cc: zsh-workers@xxxxxxxxxxxxxx
- In-reply-to: <1000804070216.ZM23696@xxxxxxxxxxxxxxxxxxxxxxx>; from schaefer@xxxxxxxxxxxxxxxxxxxxxxx on Fri, Aug 04, 2000 at 07:02:16AM +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <1000804070216.ZM23696@xxxxxxxxxxxxxxxxxxxxxxx>
> 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author