On 2017-09-16 03:17:20 +0200, Eike Rathke wrote:
> On Friday, 2017-09-15 13:02:25 -0500, Derek Martin wrote:
> > On Fri, Sep 15, 2017 at 09:43:58AM -0700, Kevin J. McCarthy wrote:
> > > On Fri, Sep 15, 2017 at 12:58:18AM +0200, Eike Rathke wrote:
> > > > Maybe path related destination buffers also shouldn't be
> > > > of _POSIX_PATH_MAX but PATH_MAX size instead.
> > >
> > > It looks like Mutt uses _POSIX_PATH_MAX in the majority of cases with
> > > just a sprinkle of PATH_MAX uses. Is PATH_MAX generally larger?
>
> *If* defined then PATH_MAX is *usually* larger than _POSIX_PATH_MAX
And it must be at least as large as _POSIX_PATH_MAX. The POSIX spec
says:
{PATH_MAX}
Maximum number of bytes the implementation will store as a
pathname in a user-supplied buffer of unspecified size, including
the terminating null character. Minimum number the implementation
will accept as the maximum number of bytes in a pathname.
Minimum Acceptable Value: {_POSIX_PATH_MAX}
> (which usually is defined to 256 including null char).
And it must be 256 in the current POSIX version:
{_POSIX_PATH_MAX}
Minimum number the implementation will accept as the maximum
number of bytes in a pathname.
Value: 256
> Though it still (for some file systems) does not represent the maximum
> length a path specifier may actually have.
Indeed.
> However, _POSIX_PATH_MAX is the maximum length a file name or directory
> name is assumed to have, not the entire path.
This is not what the POSIX spec says (see above).
--
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)