This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: For masochists: the leap o faith

On Sun, Nov 16, 2003 at 08:10:08AM +1100, Robert Collins wrote:
> Chris has noted that posixly correct behaviour and common practice may
> diverge. I think for this scenario, that posix behaviour allows the most
> accurate representation of the variety programs may encounter on cygwin
> at runtime. Therefore we'll get the best results (and perhaps uncover a
> few portability bugs) going that way.
> We have two choices (no particular order of preference):
> a) make MAX_PATH and posix friends the maximum length path cygwin will
> accept/return. Return ENAMETOOLONG on path calls on win9x, or winnt
> FAT[32] calls. Update pathconf to return appropriate values.
> b) blow away MAX_PATH and MAXPATHLEN so that programs using cygwin
> fallback to pathconf, or 'good enough for me' static arrays.  Update
> pathconf to return appropriate values.

Well, I guess you meant PATH_MAX here.  Just to reiterate, MAX_PATH is
a Windows specific constant, giving a maximum size for path names when
using ASCII mode.  Even this MAX_PATH constant doesn't actually reflect
the maximum path length possible in all cases:  CreateDirectory for
instance can only create directories with a path length up to 248
characters.  So even on native Windows, the constant is used as an upper
limit, e. g. usable for static buffer sizes in applications.  Having
said that, however, you must not change MAX_PATH.

I would prefer to change PATH_MAX and MAXPATHLEN to an arbitrary big
value as, e. g. the same as on Linux, 4096, or even the biggest possible
plus one: 32768.  The latter is probably the better value.  So my choice
is a)


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                      
Red Hat, Inc.

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]