This is the mail archive of the libc-alpha@sources.redhat.com 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]

Re: [patch] manual/conf.texi, sync _POSIX_PATH_MAX with headervalue


Mark Brown wrote:

> On Mon, Jan 08, 2001 at 07:40:24PM -0500, Ben Collins wrote:
> 
>> @comment POSIX.1
>> @item _POSIX_PATH_MAX
>> The most restrictive limit permitted by POSIX for the maximum number of
>> -bytes in a file name.  The value of this constant is @code{255}.
>> +bytes in a file name.  POSIX defines this to be no less than 255.  In
>> +the GNU C library, the value of this constant is @code{256}.
> 
> What prompted this patch was a bug report from me complaining that POSIX
> (or at least, SUS2) requires that _POSIX_PATH_MAX be exactly 255.  The
> relevant ChangeLog entry that Ben dug out was:
> 
> | 2000-04-30  Andreas Jaeger  <aj@suse.de>
> | 
> |         * posix/bits/posix1_lim.h (_POSIX_PATH_MAX): Increase to 256 in
> |           accordance with Austin Draft.
> 
> which seems to indicate that this has been done in order to conform to
> an upcoming version of the standard, which isn't what the above patch
> says.  I'm somewhat mystified as to why such a change would be made,
> though.

History:
The original POSIX spec (1003.1-1990) indicated that PATH_MAX did not
include the terminating NULL, and that _POSIX_PATH_MAX was 255. At the
time that XPG4 (the first widely-adopted XPG spec) was created, the
draft 1003.1a amendment made _POSIX_PATH_MAX be 256, a size which was
more in line with some existing industry practice. XPG4, after some
argument, allowed either size for the _POSIX_PATH_MAX variable. Future
Open Group specs (SUS v1 and v2) also allow both.

POSIX 1003.1-1996 did not increase this to 256, since 1003.1a was not
approved yet. The next revision of 1003.1 (the Austin Group project)
will incorporate 1003.1a, making _POSIX_PATH_MAX officially and finally
256.

-- 
Mark S. Brown                                             bmark@us.ibm.com
Senior Technical Staff Member                    512.838.3926  T/L678.3926
IBM RS/6000 AIX System Architecture                  Mark Brown/Austin/IBM
IBM Corporation, Austin, Texas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]