This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 06/11/2013 12:36 AM, Roland McGrath wrote:
There's precedent for my approach in realpath, where we don't use pathconf(path, _PC_PATH_MAX), either, but cap the path length at PATH_MAX.That's just following vanilla POSIX.1 rules: if PATH_MAX is defined at compile time, it's a fixed system-wide limit. If PATH_MAX is not defined at compile time, there might or might not be a limit and if there is a limit it might be filesystem-specific; pathconf reports that.
We must continue to define PATH_MAX and NAME_MAX for backwards compatibility reasons. This leads to ugly kludges when we're confronted with data from the kernel that exceeds the constants. (getwd is another such place.)
-- Florian Weimer / Red Hat Product Security Team
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |