bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Reuben Thomas <rrt@sc3d.org>
To: Bruno Haible <bruno@clisp.org>
Cc: bug-gnulib <bug-gnulib@gnu.org>
Subject: Re: NAME_MAX on MingW
Date: Mon, 8 Mar 2021 09:24:05 +0000	[thread overview]
Message-ID: <CAOnWdohyXVQk81gQn1ZPJTwwX9XJBLKh6D=GPc1nHeQa57J84Q@mail.gmail.com> (raw)
In-Reply-To: <CAOnWdohF1S_+YQrxv=UGV5xL_sSzNXSCNqaCdc_QoXFWSTRzUw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 990 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 2377 bytes --]

  reply	other threads:[~2021-03-08  9:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-07 23:22 NAME_MAX on MingW Reuben Thomas
2021-03-08  0:14 ` Bruno Haible
2021-03-08  0:16   ` Reuben Thomas
2021-03-08  9:24     ` Reuben Thomas [this message]
2021-03-08 10:06       ` Bruno Haible
2021-03-08 10:12         ` Reuben Thomas
2021-03-08  9:12   ` Reuben Thomas
2021-03-08  9:56     ` Bruno Haible

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOnWdohyXVQk81gQn1ZPJTwwX9XJBLKh6D=GPc1nHeQa57J84Q@mail.gmail.com' \
    --to=rrt@sc3d.org \
    --cc=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).