🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.unix
Article #803

Re: FILENAME_MAX & _POSIX_PATH_MAX relationship?

#803
From: David A Willcox
Date: Thu, 11 Apr 1991 13:15
23 lines
1697 bytes
Submitted-by: willcox@urbana.mcd.mot.com (David A Willcox)

>>Would someone who knows please tell me the relationship between the
>>Standard C macro FILENAME_MAX and the POSIX macro _POSIX_PATH_MAX.

>_POSIX_PATH_MAX is more appropriate.  Standard C has no notion of a
>path prefix.  Clause 4.9.1 of both the Standard and its rationale
>tells us that a buffer of FILENAME_MAX characters should hold
>the entire file name (what POSIX.1 would term the 'path').

_POSIX_PATH_MAX is probably not the correct value, unless your
implementation never supports anything larger than the minimum
required by POSIX.  PATH_MAX would be better, if it's defined on your
implementation (implying that you don't need to call pathconf() to get
a path-specific value).  If PATH_MAX isn't defined, then FILENAME_MAX
must be no smaller than the largest value you can get from
pathconf(_PC_PATH_MAX,...).

David A. Willcox		"Just say 'NO' to universal drug testing"

[ Standards are such lovely things... -mod ]

Volume-Number: Volume 23, Number 28
Technical Details
Message-ID: <128359@uunet.UU.NET>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!uunet!uunet.UU.NET!sef
References: <127638@uunet.UU.NET> <128263@uunet.UU.NET>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!uunet!uunet.UU.NET!sef
From: willcox@urbana.mcd.mot.com (David A Willcox)
Newsgroups: comp.std.unix
Subject: Re: FILENAME_MAX & _POSIX_PATH_MAX relationship?
Message-ID: <128359@uunet.UU.NET>
Date: 11 Apr 91 13:15:01 GMT
References: <127638@uunet.UU.NET> <128263@uunet.UU.NET>
Sender: usenet@uunet.UU.NET
Organization: Motorola Computer Group, Urbana Design Center
Lines: 23
Approved: sef@uunet.uu.net (Moderator, Sean Eric Fagan - comp.std.unix)
Nntp-Posting-Host: uunet.uu.net
X-Submissions: std-unix@uunet.uu.net
Originator: sef@uunet.UU.NET