Some platforms lack any PATH_MAX definition. This defines PATH_MAX to a
sensibly large size in such cases.
Also, add one to PATH_MAX for the null byte.
Differential D51634
Define PATH_MAX if missing. DiamondLovesYou on Sep 4 2018, 8:11 AM. Authored by
Details
Some platforms lack any PATH_MAX definition. This defines PATH_MAX to a Also, add one to PATH_MAX for the null byte.
Diff Detail
Event Timeline
Comment Actions Thanks for the comments, everyone. This was originally submitted to fix a rust-lang buildbot, which I've learned is based on CentOS 5.5 (yes). Anyhow, I've fixed the issue on that particular buildbot by defining PATH_MAX in C(XX)FLAGS. Thus this patch isn't needed anymore. Thanks again. |
From Linux' limits.h:
I'd conclude that it is not necessary to reserve an additional char for the terminating nul.