[gs-devel] What is a reasonable value for 'gp_file_name_sizeof'

Ralph Giles ralph.giles at artifex.com
Mon Aug 27 11:54:50 PDT 2007


On Mon, Aug 27, 2007 at 11:43:28AM -0700, Ray Johnston wrote:

> In looking into a support issue for a customer (#1), I noticed that
> src/gp.h has '#define gp_file_name_sizeof 260' with a comment that
> this is the maximum size for Windows.
> 
> This strikes me as extremely unlikely to be the Windows limit (at
> least since Windows 98 added long file name support).

My glibc headers have a _POSIX_PATH_MAX defined at 256, so the current 
setting probably is a portable maximum. I'd suggest using PATH_MAX if
it's defined, since many implementation set this, and it should be
reliable. On my GNU/Linux system it's 4096, but on MacOS X it's only 
1024.

BTW, most headers distinguish between a PATH_MAX and a FILENAME_MAX,
since the underlying filesystem can have a different limitation for
the actual name of the file, but I think our usage assumes PATH_MAX.

 -r




More information about the gs-devel mailing list