FILENAME_MAX & _POSIX_PATH_MAX relationship?

Bob Goudreau goudreau at dg-rtp.dg.com
Fri Apr 12 02:49:35 AEST 1991


Submitted-by: goudreau at dg-rtp.dg.com (Bob Goudreau)

In article <128358 at uunet.UU.NET>, decot at hpisod2.cup.hp.com (Dave Decot) writes:
> 
> > To quote from the C standard, FILENAME_MAX:
> > 
> >     ... expands to an integral constant expression that is the size needed
> >     for an array of char large enough to hold the longest file name
> >     string that the implementation guarantees can be opened. [There's
> >     a footnote saying that this doesn't mean that just any string this
> >     long is a valid file name.]
> 
> They can footnote all they want; the text requires me to set FILENAME_MAX
> to the size of the longest filename I *guarantee* can be opened.

I believe the point about the footnote was that string-length is not
the *only* criterion in determining if the filename is valid.  The
system may disallow various characters from filenames, for example.
The relevant footnote text is:

	Of course, file name string contents are subject to other
	system-specific constraints; therefore, _all_ possible
	strings of length FILENAME_MAX cannot be expected to be
	opened sucessfully.
 
----------------------------------------------------------------------
Bob Goudreau				+1 919 248 6231
Data General Corporation		goudreau at dg-rtp.dg.com
62 Alexander Drive			...!mcnc!rti!xyzzy!goudreau
Research Triangle Park, NC  27709, USA


Volume-Number: Volume 23, Number 29



More information about the Comp.std.unix mailing list