[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PATH_MAX with mingw
From: |
Bruno Haible |
Subject: |
Re: PATH_MAX with mingw |
Date: |
Sat, 25 Aug 2007 22:51:38 +0200 |
User-agent: |
KMail/1.5.4 |
Hello Sylvain,
Sylvain Beucler wrote:
> I see that under Woe, MAX_PATH is the equivalent for PATH_MAX, and is
> set to 260 in MinGW's headers (windef.h).
An old copy of mingw defines PATH_MAX already in <limits.h>:
/*
* File system limits
*
* TODO: NAME_MAX and OPEN_MAX are file system limits or not? Are they the
* same as FILENAME_MAX and FOPEN_MAX from stdio.h?
* NOTE: Apparently the actual size of PATH_MAX is 260, but a space is
* required for the NUL. TODO: Test?
*/
#define PATH_MAX (259)
So, it may be that MAX_PATH is not the same (semantically) as PATH_MAX.
> Would it be interesting to check for MAX_PATH in pathmax.h, instead of
> defaulting to 256?
The default of 256 is not used, since <limits.h> already defines PATH_MAX.
This looks like the right thing to me: why should gnulib override the
definition from <limits.h> without a good reason?
Bruno