bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NAME_MAX on MingW


From: Reuben Thomas
Subject: Re: NAME_MAX on MingW
Date: Mon, 8 Mar 2021 09:24:05 +0000

On Mon, 8 Mar 2021 at 00:16, Reuben Thomas <rrt@sc3d.org> wrote:
On Mon, 8 Mar 2021 at 00:14, Bruno Haible <bruno@clisp.org> wrote:
Hi Reuben,

> NAME_MAX is defined in limits.h.

No. POSIX [1] specifies that it may be omitted from <limits.h>, and
that pathconf (_PC_NAME_MAX) is the right way to access the maximum
length of a file name component. [2]

Ah, thanks for setting me straight!

Unfortunately, this doesn't help, because pathconf is not present on mingw. So the best I can do is #define _POSIX_ to get the value of NAME_MAX that it has.

So given that the pathconf constants are available like this on mingw, perhaps there is something gnulib can do? I'm not sure what is best, whether simply to allow those constants to be found by defining _POSIX_, or to implement pathconf with them.

In any case: the information does already exist in some form, and there's no way to get at it portably with gnulib, that I can see.

--
https://rrt.sc3d.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]