cygwin/acl.h not included from sys/acl.h

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

cygwin/acl.h not included from sys/acl.h

Cygwin list mailing list
Many of the headers in 'sys' include their counterparts from 'cygwin'. Why is acl.h special? I see the comment on line 25 but I'm missing the point, I guess - not seeing the collisions.

'cygwin/acl.h' is a very important file. Granted I don't normally compile much from source under Cygwin but I was building my own (very slightly) modified RSYNC and stumbled across the missing dependency.

What is the correct solution if the 1-liner fix to sys/acl.h is not acceptable?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: cygwin/acl.h not included from sys/acl.h

Corinna Vinschen-2
On Oct 18 08:30, matthew patton via cygwin wrote:
> Many of the headers in 'sys' include their counterparts from 'cygwin'.
> Why is acl.h special? I see the comment on line 25 but I'm missing the
> point, I guess - not seeing the collisions.

Not collisions, namespace poisoning.  cygwin/acl.h defines the
old Solaris macros and function calls, but a POSIX application
should be free to use functions like "acl" by itself.

> 'cygwin/acl.h' is a very important file.

No, it isn't, if you're using POSIX ACLs.

> Granted I don't normally
> compile much from source under Cygwin but I was building my own (very
> slightly) modified RSYNC and stumbled across the missing dependency.
>
> What is the correct solution if the 1-liner fix to sys/acl.h is not
> acceptable?

Build rsync with POSIX ACL support.  It's already in the sources.  It's
very likely that a simple autoconf (or autoreconf if you build from repo
sources) will do.


Corinna

--
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: cygwin/acl.h not included from sys/acl.h

Cygwin list mailing list
In reply to this post by Cygwin list mailing list
https://github.com/tuna/rsync/blob/master/configure.ac#L981

Looks like it was short-circuited to use Solaris ACLs. I'll send the RSYNC guys a patch.
Defeating the case statement does pick up Posix ACLs.

$ grep -i acl config.status
S["LIBS"]="-lacl "
D["HAVE_SYS_ACL_H"]=" 1"
D["HAVE_ACL_LIBACL_H"]=" 1"
D["HAVE_ACLSORT"]=" 1"
D["HAVE_LIBACL"]=" 1"
D["HAVE_POSIX_ACLS"]=" 1"
D["SUPPORT_ACLS"]=" 1

I don't know what the elegant solution is to intuit the need to include cygwin/acl.h if HAVE_SOLARIS_ACLS though.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple