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



Reply via email to