On Mar 20 16:27, Martin Wege wrote: > On Thu, Mar 20, 2025 at 2:09 PM Corinna Vinschen > <corinna-cyg...@cygwin.com> wrote: > > > > On Mar 20 10:51, Martin Wege wrote: > > > On Thu, Mar 20, 2025 at 10:36 AM Corinna Vinschen > > > <corinna-cyg...@cygwin.com> wrote: > > > > > > > > On Mar 20 10:26, Martin Wege wrote: > > > > > Hello! > > > > > > > > > > Here is one wishlist item for Cygwin 3.7: > > > > > > > > > > Add the Solaris/UNIX acl(7) API, i.e acl(), facl(), aclcheck(), > > > > > aclsort(). > > > > > > > > They exist in Cygwin since 2001. Just include <cygwin/acl.h> > > > > > > 😮😮😮 <--- face with open mouth > > > Corinna, this is unbelievable!! > > > Why are you hiding such a GEM?? > > > > I don't. It's documented for ages: > > https://cygwin.com/cygwin-api/std-solaris.html > > > > > Seriously, why is this not in /usr/include/acl.h? > > > > There is no acl.h, there's only a sys/acl.h, and it contains > > the POSIX.1e draft, as in Linux: > > https://cygwin.com/cygwin-api/std-deprec.html > > > > But that reminds me, the doc should note that these are in cygwin/acl.h. > > I'll add that. > > > > > Windows (mingw, Visual Studio, Borland C) does not have an acl.h > > > header, and there is no /usr/include/acl.h on Linux, so please do a > > > echo "#include <cygwin/acl.h>" >/usr/include/acl.h > > > > There's no precedent for cluttering the /usr/include namespace with > > a generic acl.h, so, no, just include cygwin/acl.h. > > How should applications/developers EVER find this? Quick tests shows > 20+ applications with Solaris/UNIX ACL support (not POSIX depreciated > draft ACLs), but none looks at /usr/include/cygwin/
Sorry, but that's nonsense. The file is documented as sys/acl.h, NOT acl.h. If the application doesn't find cygwin/acl.h it won't find acl.h neither. And from what I could dig up in the net, if it finds /usr/include/acl.h, it will expect the file to define AIX ACLs not supported by Cygwin, see for instance (https://github.com/RsyncProject/rsync/blob/master/lib/sysacls.h) So either way, since POSIX ACLs are preferred, it will have to be *ported* to Cygwin. Something like #ifdef __CYGWIN__ #include <cygwin/acl.h> #else #include <sys/acl.h> #endif is the entire porting effort necessary to let it work on Cygwin. Impressive, isn't it? OTOH, if the application supports Solaris ACLs but not POSIX ACLs, it won't run on Linux either without *noticable* porting effort, because all the calls in the application have to be ported. Compare that with the marginal Cygwin porting effort above. Corinna