Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!uunet.UU.NET!sef From: goudreau@dg-rtp.dg.com (Bob Goudreau) Newsgroups: comp.std.unix Subject: Re: FILENAME_MAX & _POSIX_PATH_MAX relationship? Message-ID: <128377@uunet.UU.NET> Date: 11 Apr 91 16:49:35 GMT References: <128358@uunet.UU.NET>, Sender: usenet@uunet.UU.NET Lines: 33 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 Submitted-by: goudreau@dg-rtp.dg.com (Bob Goudreau) In article <128358@uunet.UU.NET>, decot@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@dg-rtp.dg.com 62 Alexander Drive ...!mcnc!rti!xyzzy!goudreau Research Triangle Park, NC 27709, USA Volume-Number: Volume 23, Number 29