Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: pathconf() again



> But ... readlink() doesn't have any provision to "read more of the link"
> and doesn't tell you if it truncated what it did read.

I didn't realize that readlink() was so unfriendly.  You could
memset() the buffer with 0 and then test to see if the final octet
of the buffer was still zero.  If it is, you have a complete,
zero-terminated string.  If not, realloc the buffer and try again.

I don't know if that's more or less ugly.

> Only if it's a relative rather than absolute link.

I don't understand the significance.



Messages sorted by: Reverse Date, Date, Thread, Author