[PATCH] include/cygwin/limits.h: add XATTR_{NAME,SIZE,LIST}_MAX
Corinna Vinschen
corinna-cygwin@cygwin.com
Wed Jun 7 10:06:33 GMT 2023
On Jun 6 17:17, Philippe Cerfon wrote:
> On Tue, Jun 6, 2023 at 3:28 PM Corinna Vinschen
> <corinna-cygwin@cygwin.com> wrote:
> > Yes, it is wrong, because the value of MAX_EA_NAME_LEN / XATTR_NAME_MAX
> > is used for array size definitions as well as comparisons.
>
> Do you prefer to keep MAX_EA_NAME_LEN and just have that set like,
> perhaps with an additional comment that explains it:
> #define MAX_EA_NAME_LEN (XATTR_NAME_MAX + 1 - strlen("user."))
> or rather inline all that without any MAX_EA_NAME_LEN?
Hmm, the comparisons would have to check for XATTR_NAME_MAX anyway,
so maybe inlining is cleaner in this case.
Greets,
Corinna
More information about the Cygwin-patches
mailing list