[PATCH] include/cygwin/limits.h: add XATTR_{NAME,SIZE,LIST}_MAX

Philippe Cerfon philcerf@gmail.com
Fri Jun 16 15:43:35 GMT 2023


Hey.

On Fri, Jun 16, 2023 at 5:04 PM Corinna Vinschen
<corinna-cygwin@cygwin.com> wrote:
> Oh well. Now that I see it in real life, my idea to use the entire
> expression inline wasn't that great, it seems...

^^


> I didn't want to keep MAX_EA_NAME_LEN because now that we have an
> official name for the value, having an unofficial name using a different
> naming convention is a bit weird.
>
> On the other hand, having a macro for the expression certainly looks
> much cleaner.  Also, only one place to change (should a change ever be
> necessary).

Does both make sense.


> Sorry about that.

No worries :-)


> What do you think about something like _XATTR_NAME_MAX_ONDISK_?

Really with trailing/leading underscores? If you try to keep it out of
the "official namespace", then I'd would perhaps make more sense to
mark this as being cygwin specific like CYGWIN_XATTR_NAME_MAX_ONDISK
or so?
Also - may be nitpicking - but storage is not really guaranteed to be
a disk anymore. Maybe ONSTORAGE instead? But admittedly ONDISK sounds
more common ("on disk format", etc.).

> I can also just push the patches and we discuss this further afterwards,
> your call.

Well you know the naming convention used in your code much better than I do.

Attached patches use _XATTR_NAME_MAX_ONDISK_ as you proposed.

Just pick whichever name you like best, and either tell me and I
provide a new patch, or just sed 's/_XATTR_NAME_MAX_ONDISK_/foobar/g'
(+ maybe align text wrapping of comments if necessary).


Thanks,
Philippe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Cygwin-export-XATTR_-NAME-SIZE-LIST-_MAX.patch
Type: text/x-patch
Size: 1099 bytes
Desc: not available
URL: <https://cygwin.com/pipermail/cygwin-patches/attachments/20230616/5acc9831/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Cygwin-use-new-XATTR_-NAME-SIZE-_MAX-instead-of-MAX_.patch
Type: text/x-patch
Size: 3239 bytes
Desc: not available
URL: <https://cygwin.com/pipermail/cygwin-patches/attachments/20230616/5acc9831/attachment-0001.bin>


More information about the Cygwin-patches mailing list