Page MenuHomePhabricator

Add missing PATH_MAX for GNU Hurd support
Needs ReviewPublic

Authored by sylvestre.ledru on Oct 18 2018, 1:28 PM.



If you have a better place to put them, don't hesitate to let me know :)

Patch by Svante Signell & myself

Diff Detail

Event Timeline

rsmith added a subscriber: rsmith.Oct 18 2018, 1:57 PM
rsmith added inline comments.

This doesn't appear to be necessary: the identifier PATH_MAX does not appear later in this file.


I think this is generally the wrong way to address this problem on Hurd:

If PATH_MAX isn't defined, we should instead pass NULL to realpath (and deallocate the result): passing a fixed-size buffer is wrong, because we cannot assume that the real path will fit in 4096 bytes.

(If we neither have PATH_MAX defined nor a realpath that can accept a null pointer as the destination buffer, then realpath is unusable on that platform and there's nothing we can do there but return a false result to the caller of real_path.)