[gs-devel] What is a reasonable value for 'gp_file_name_sizeof'
SaGS
sags5495 at hotmail.com
Tue Aug 28 00:31:03 PDT 2007
----- Original Message -----
From: "Ray Johnston" <Ray.Johnston at Artifex.com>
To: "tech" <tech at artifex.com>
Cc: "gs-devel" <gs-devel at ghostscript.com>
Sent: Monday, 27 August 2007 21:43
Subject: [gs-devel] What is a reasonable value for 'gp_file_name_sizeof'
> ...
>
> 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).
> ...
For Windows:
260 is indeed the "normal" maximum for a full path on Windows, even if it is
very close to the maximum for the filename-proper part (256).
There are 2 #defines for the max path length: _MAX_PATH (with a leading
underscore) in the CRTL headers and MAX_PATH (without leading underscore) in
the Platform SDK headers. The value for both is 260.
On Win2K and later (not sure about WinNT4), but not on Win95/98/ME, it is
possible to have full paths of max 32K-1 characters. These are supported by
the Unicode versions of file handling routines, if the full path is prefixed
with "\\?\". I never attempted to compile GS as a Unicode application, and I
don't think it would work.
More information about the gs-devel
mailing list