delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/01/13/14:27:21

Date: Mon, 13 Jan 2003 21:25:58 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp-workers AT delorie DOT com
Message-Id: <3405-Mon13Jan2003212557+0200-eliz@is.elta.co.il>
X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9
In-reply-to: <3E22D46D.116FDB95@phekda.freeserve.co.uk> (message from Richard
Dawe on Mon, 13 Jan 2003 14:59:57 +0000)
Subject: Re: FILENAME_MAX - does it include a nul terminator?
References: <3E22D46D DOT 116FDB95 AT phekda DOT freeserve DOT co DOT uk>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Mon, 13 Jan 2003 14:59:57 +0000
> From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
> 
> "FILENAME_MAX which expands to an integer 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;"
> 
> So it seems that FILENAME_MAX does include the nul terminator.

You are right, FILENAME_MAX does include the space for the null
terminator.

> PATH_MAX also includes space for the terminator. I haven't looked at uses of
> that, but I suspect a similar problem may exist.

For PATH_MAX, this doesn't really matter, since our PATH_MAX has the
value of 512, way more than any platform we support needs...

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019