public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Problem with new acl code and cdrtools
@ 2016-02-08 10:02 Ismail Donmez
  2016-02-08 13:18 ` Corinna Vinschen
  0 siblings, 1 reply; 18+ messages in thread
From: Ismail Donmez @ 2016-02-08 10:02 UTC (permalink / raw)
  To: cygwin

Hi,

cdrtools has some code to detect Solaris style ACLs:

#if defined(HAVE_ACL) && defined(HAVE_FACL) && \
     defined(HAVE_ACLFROMTEXT) && defined(HAVE_ACLTOTEXT)
#   define  HAVE_SUN_ACL    1 /* Sun UFS ACL's present */
#endif

Since cygwin still seems to be defining aclfromtext() and acltotext()
functions (which are not defined in POSIX) cdrtools thinks this a
Solaris-style system and get up getting a compile error later on.

Since we are switching to POSIX ACLs it would be nice to remove
Solaris-only ACL functions.

Thanks,
ismail

--
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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Problem with new acl code and cdrtools
  2016-02-08 10:02 Problem with new acl code and cdrtools Ismail Donmez
@ 2016-02-08 13:18 ` Corinna Vinschen
  2016-02-08 13:31   ` Ismail Donmez
  0 siblings, 1 reply; 18+ messages in thread
From: Corinna Vinschen @ 2016-02-08 13:18 UTC (permalink / raw)
  To: cygwin

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

On Feb  8 12:01, Ismail Donmez wrote:
> Hi,
> 
> cdrtools has some code to detect Solaris style ACLs:
> 
> #if defined(HAVE_ACL) && defined(HAVE_FACL) && \
>      defined(HAVE_ACLFROMTEXT) && defined(HAVE_ACLTOTEXT)
> #   define  HAVE_SUN_ACL    1 /* Sun UFS ACL's present */
> #endif
> 
> Since cygwin still seems to be defining aclfromtext() and acltotext()
> functions (which are not defined in POSIX) cdrtools thinks this a
> Solaris-style system and get up getting a compile error later on.

Probably due to including sys/acl.h.  Does swtiching to cygwin/acl.h
help?  Or changing the above check to prefer POSIX ACLs over Solaris
ACLs?

> Since we are switching to POSIX ACLs it would be nice to remove
> Solaris-only ACL functions.

We can't do that for backward compatibility.  The Solaris function
have to stay available, not the least for Cygwin's getfacl/setfacl
which still use them.


Corinna

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Problem with new acl code and cdrtools
  2016-02-08 13:18 ` Corinna Vinschen
@ 2016-02-08 13:31   ` Ismail Donmez
  2016-02-08 14:10     ` Corinna Vinschen
  2016-02-08 16:29     ` Peter Rosin
  0 siblings, 2 replies; 18+ messages in thread
From: Ismail Donmez @ 2016-02-08 13:31 UTC (permalink / raw)
  To: cygwin

On Mon, Feb 8, 2016 at 3:18 PM, Corinna Vinschen
<corinna-cygwin@cygwin.com> wrote:
> On Feb  8 12:01, Ismail Donmez wrote:
>> Hi,
>>
>> cdrtools has some code to detect Solaris style ACLs:
>>
>> #if defined(HAVE_ACL) && defined(HAVE_FACL) && \
>>      defined(HAVE_ACLFROMTEXT) && defined(HAVE_ACLTOTEXT)
>> #   define  HAVE_SUN_ACL    1 /* Sun UFS ACL's present */
>> #endif
>>
>> Since cygwin still seems to be defining aclfromtext() and acltotext()
>> functions (which are not defined in POSIX) cdrtools thinks this a
>> Solaris-style system and get up getting a compile error later on.
>
> Probably due to including sys/acl.h.  Does swtiching to cygwin/acl.h
> help?  Or changing the above check to prefer POSIX ACLs over Solaris
> ACLs?

This is a generic code so I don't want to add a cygwin specific
dependency there. Is there a preprocessor definition for cygwin
version? I could use that to disable HAVE_SUN_ACL for cygwin 2.5+

>
>> Since we are switching to POSIX ACLs it would be nice to remove
>> Solaris-only ACL functions.
>
> We can't do that for backward compatibility.  The Solaris function
> have to stay available, not the least for Cygwin's getfacl/setfacl
> which still use them.

I see, thanks.

ismail

--
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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Problem with new acl code and cdrtools
  2016-02-08 13:31   ` Ismail Donmez
@ 2016-02-08 14:10     ` Corinna Vinschen
  2016-02-08 14:14       ` Ismail Donmez
  2016-02-08 19:24       ` Yaakov Selkowitz
  2016-02-08 16:29     ` Peter Rosin
  1 sibling, 2 replies; 18+ messages in thread
From: Corinna Vinschen @ 2016-02-08 14:10 UTC (permalink / raw)
  To: cygwin

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

On Feb  8 15:31, Ismail Donmez wrote:
> On Mon, Feb 8, 2016 at 3:18 PM, Corinna Vinschen
> <corinna-cygwin@cygwin.com> wrote:
> > On Feb  8 12:01, Ismail Donmez wrote:
> >> Hi,
> >>
> >> cdrtools has some code to detect Solaris style ACLs:
> >>
> >> #if defined(HAVE_ACL) && defined(HAVE_FACL) && \
> >>      defined(HAVE_ACLFROMTEXT) && defined(HAVE_ACLTOTEXT)
> >> #   define  HAVE_SUN_ACL    1 /* Sun UFS ACL's present */
> >> #endif
> >>
> >> Since cygwin still seems to be defining aclfromtext() and acltotext()
> >> functions (which are not defined in POSIX) cdrtools thinks this a
> >> Solaris-style system and get up getting a compile error later on.
> >
> > Probably due to including sys/acl.h.  Does swtiching to cygwin/acl.h
> > help?  Or changing the above check to prefer POSIX ACLs over Solaris
> > ACLs?
> 
> This is a generic code so I don't want to add a cygwin specific
> dependency there. Is there a preprocessor definition for cygwin
> version? I could use that to disable HAVE_SUN_ACL for cygwin 2.5+

If you include cygwin/version.h you could use the version definitions.

Alternatively we could allow to use the Solaris ACL functions even if
only including sys/acl.h, given some macro:

  sys/acl.h:

    #ifdef __USE_OLD_SOLARIS_ACL_FUNCTIONS
    # include <cygwin/acl.h>
    #else
      [...POSIX definitions...]
    #endif

Would that help?


Corinna

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Problem with new acl code and cdrtools
  2016-02-08 14:10     ` Corinna Vinschen
@ 2016-02-08 14:14       ` Ismail Donmez
  2016-02-08 14:36         ` Corinna Vinschen
  2016-02-08 19:24       ` Yaakov Selkowitz
  1 sibling, 1 reply; 18+ messages in thread
From: Ismail Donmez @ 2016-02-08 14:14 UTC (permalink / raw)
  To: cygwin

On Mon, Feb 8, 2016 at 4:10 PM, Corinna Vinschen
<corinna-cygwin@cygwin.com> wrote:
> On Feb  8 15:31, Ismail Donmez wrote:
>> On Mon, Feb 8, 2016 at 3:18 PM, Corinna Vinschen
>> <corinna-cygwin@cygwin.com> wrote:
>> > On Feb  8 12:01, Ismail Donmez wrote:
>> >> Hi,
>> >>
>> >> cdrtools has some code to detect Solaris style ACLs:
>> >>
>> >> #if defined(HAVE_ACL) && defined(HAVE_FACL) && \
>> >>      defined(HAVE_ACLFROMTEXT) && defined(HAVE_ACLTOTEXT)
>> >> #   define  HAVE_SUN_ACL    1 /* Sun UFS ACL's present */
>> >> #endif
>> >>
>> >> Since cygwin still seems to be defining aclfromtext() and acltotext()
>> >> functions (which are not defined in POSIX) cdrtools thinks this a
>> >> Solaris-style system and get up getting a compile error later on.
>> >
>> > Probably due to including sys/acl.h.  Does swtiching to cygwin/acl.h
>> > help?  Or changing the above check to prefer POSIX ACLs over Solaris
>> > ACLs?
>>
>> This is a generic code so I don't want to add a cygwin specific
>> dependency there. Is there a preprocessor definition for cygwin
>> version? I could use that to disable HAVE_SUN_ACL for cygwin 2.5+
>
> If you include cygwin/version.h you could use the version definitions.
>
> Alternatively we could allow to use the Solaris ACL functions even if
> only including sys/acl.h, given some macro:
>
>   sys/acl.h:
>
>     #ifdef __USE_OLD_SOLARIS_ACL_FUNCTIONS
>     # include <cygwin/acl.h>
>     #else
>       [...POSIX definitions...]
>     #endif
>
> Would that help?

That should help, I cook a patch and send to cdrecord maintainer.

Thanks a lot.
ismail

--
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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Problem with new acl code and cdrtools
  2016-02-08 14:14       ` Ismail Donmez
@ 2016-02-08 14:36         ` Corinna Vinschen
  2016-02-08 16:10           ` Ismail Donmez
  0 siblings, 1 reply; 18+ messages in thread
From: Corinna Vinschen @ 2016-02-08 14:36 UTC (permalink / raw)
  To: cygwin

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

On Feb  8 16:13, Ismail Donmez wrote:
> On Mon, Feb 8, 2016 at 4:10 PM, Corinna Vinschen
> <corinna-cygwin@cygwin.com> wrote:
> > On Feb  8 15:31, Ismail Donmez wrote:
> >> On Mon, Feb 8, 2016 at 3:18 PM, Corinna Vinschen
> >> <corinna-cygwin@cygwin.com> wrote:
> >> > On Feb  8 12:01, Ismail Donmez wrote:
> >> >> Hi,
> >> >>
> >> >> cdrtools has some code to detect Solaris style ACLs:
> >> >>
> >> >> #if defined(HAVE_ACL) && defined(HAVE_FACL) && \
> >> >>      defined(HAVE_ACLFROMTEXT) && defined(HAVE_ACLTOTEXT)
> >> >> #   define  HAVE_SUN_ACL    1 /* Sun UFS ACL's present */
> >> >> #endif
> >> >>
> >> >> Since cygwin still seems to be defining aclfromtext() and acltotext()
> >> >> functions (which are not defined in POSIX) cdrtools thinks this a
> >> >> Solaris-style system and get up getting a compile error later on.
> >> >
> >> > Probably due to including sys/acl.h.  Does swtiching to cygwin/acl.h
> >> > help?  Or changing the above check to prefer POSIX ACLs over Solaris
> >> > ACLs?
> >>
> >> This is a generic code so I don't want to add a cygwin specific
> >> dependency there. Is there a preprocessor definition for cygwin
> >> version? I could use that to disable HAVE_SUN_ACL for cygwin 2.5+
> >
> > If you include cygwin/version.h you could use the version definitions.
> >
> > Alternatively we could allow to use the Solaris ACL functions even if
> > only including sys/acl.h, given some macro:
> >
> >   sys/acl.h:
> >
> >     #ifdef __USE_OLD_SOLARIS_ACL_FUNCTIONS
> >     # include <cygwin/acl.h>
> >     #else
> >       [...POSIX definitions...]
> >     #endif
> >
> > Would that help?
> 
> That should help, I cook a patch and send to cdrecord maintainer.

Wait, that's a bit premature.  I'm not even sure yet if the macro name
is ok.


Corinna

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Problem with new acl code and cdrtools
  2016-02-08 14:36         ` Corinna Vinschen
@ 2016-02-08 16:10           ` Ismail Donmez
  0 siblings, 0 replies; 18+ messages in thread
From: Ismail Donmez @ 2016-02-08 16:10 UTC (permalink / raw)
  To: cygwin

On Mon, Feb 8, 2016 at 4:36 PM, Corinna Vinschen
<corinna-cygwin@cygwin.com> wrote:
> On Feb  8 16:13, Ismail Donmez wrote:
>> On Mon, Feb 8, 2016 at 4:10 PM, Corinna Vinschen
>> <corinna-cygwin@cygwin.com> wrote:
>> > On Feb  8 15:31, Ismail Donmez wrote:
>> >> On Mon, Feb 8, 2016 at 3:18 PM, Corinna Vinschen
>> >> <corinna-cygwin@cygwin.com> wrote:
>> >> > On Feb  8 12:01, Ismail Donmez wrote:
>> >> >> Hi,
>> >> >>
>> >> >> cdrtools has some code to detect Solaris style ACLs:
>> >> >>
>> >> >> #if defined(HAVE_ACL) && defined(HAVE_FACL) && \
>> >> >>      defined(HAVE_ACLFROMTEXT) && defined(HAVE_ACLTOTEXT)
>> >> >> #   define  HAVE_SUN_ACL    1 /* Sun UFS ACL's present */
>> >> >> #endif
>> >> >>
>> >> >> Since cygwin still seems to be defining aclfromtext() and acltotext()
>> >> >> functions (which are not defined in POSIX) cdrtools thinks this a
>> >> >> Solaris-style system and get up getting a compile error later on.
>> >> >
>> >> > Probably due to including sys/acl.h.  Does swtiching to cygwin/acl.h
>> >> > help?  Or changing the above check to prefer POSIX ACLs over Solaris
>> >> > ACLs?
>> >>
>> >> This is a generic code so I don't want to add a cygwin specific
>> >> dependency there. Is there a preprocessor definition for cygwin
>> >> version? I could use that to disable HAVE_SUN_ACL for cygwin 2.5+
>> >
>> > If you include cygwin/version.h you could use the version definitions.
>> >
>> > Alternatively we could allow to use the Solaris ACL functions even if
>> > only including sys/acl.h, given some macro:
>> >
>> >   sys/acl.h:
>> >
>> >     #ifdef __USE_OLD_SOLARIS_ACL_FUNCTIONS
>> >     # include <cygwin/acl.h>
>> >     #else
>> >       [...POSIX definitions...]
>> >     #endif
>> >
>> > Would that help?
>>
>> That should help, I cook a patch and send to cdrecord maintainer.
>
> Wait, that's a bit premature.  I'm not even sure yet if the macro name
> is ok.

I thought the macro already exissts sorry. But, again I would prefer a
__cygwin_version__ macro anyway.

Thanks,
ismail

--
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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Problem with new acl code and cdrtools
  2016-02-08 13:31   ` Ismail Donmez
  2016-02-08 14:10     ` Corinna Vinschen
@ 2016-02-08 16:29     ` Peter Rosin
  2016-02-08 17:00       ` Ismail Donmez
  1 sibling, 1 reply; 18+ messages in thread
From: Peter Rosin @ 2016-02-08 16:29 UTC (permalink / raw)
  To: cygwin

On 2016-02-08 14:31, Ismail Donmez wrote:
> This is a generic code so I don't want to add a cygwin specific
> dependency there. Is there a preprocessor definition for cygwin
> version? I could use that to disable HAVE_SUN_ACL for cygwin 2.5+

Pardon me for butting in, but isn't adding a Cygwin version check
about as non-generic as it gets?

Wouldn't something like this work:

.../configure ac_cv_func_aclfromtext=no

Cheers,
Peter

--
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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Problem with new acl code and cdrtools
  2016-02-08 16:29     ` Peter Rosin
@ 2016-02-08 17:00       ` Ismail Donmez
  2016-02-09  4:14         ` Warren Young
  0 siblings, 1 reply; 18+ messages in thread
From: Ismail Donmez @ 2016-02-08 17:00 UTC (permalink / raw)
  To: cygwin

On Mon, Feb 8, 2016 at 6:29 PM, Peter Rosin <peda@lysator.liu.se> wrote:
> On 2016-02-08 14:31, Ismail Donmez wrote:
>> This is a generic code so I don't want to add a cygwin specific
>> dependency there. Is there a preprocessor definition for cygwin
>> version? I could use that to disable HAVE_SUN_ACL for cygwin 2.5+
>
> Pardon me for butting in, but isn't adding a Cygwin version check
> about as non-generic as it gets?
>
> Wouldn't something like this work:
>
> .../configure ac_cv_func_aclfromtext=no

Thats a hack :)

--
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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Problem with new acl code and cdrtools
  2016-02-08 14:10     ` Corinna Vinschen
  2016-02-08 14:14       ` Ismail Donmez
@ 2016-02-08 19:24       ` Yaakov Selkowitz
  2016-02-09  9:36         ` Corinna Vinschen
  1 sibling, 1 reply; 18+ messages in thread
From: Yaakov Selkowitz @ 2016-02-08 19:24 UTC (permalink / raw)
  To: cygwin

On 2016-02-08 08:10, Corinna Vinschen wrote:
> Alternatively we could allow to use the Solaris ACL functions even if
> only including sys/acl.h, given some macro:
>
>    sys/acl.h:
>
>      #ifdef __USE_OLD_SOLARIS_ACL_FUNCTIONS
>      # include <cygwin/acl.h>
>      #else
>        [...POSIX definitions...]
>      #endif

Do the functions or typedefs conflict in any way?

-- 
Yaakov

--
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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Problem with new acl code and cdrtools
  2016-02-08 17:00       ` Ismail Donmez
@ 2016-02-09  4:14         ` Warren Young
  2016-02-09  7:57           ` Ismail Donmez
  0 siblings, 1 reply; 18+ messages in thread
From: Warren Young @ 2016-02-09  4:14 UTC (permalink / raw)
  To: The Cygwin Mailing List

On Feb 8, 2016, at 9:59 AM, Ismail Donmez <ismail@i10z.com> wrote:
> 
> On Mon, Feb 8, 2016 at 6:29 PM, Peter Rosin <peda@lysator.liu.se> wrote:
>> On 2016-02-08 14:31, Ismail Donmez wrote:
>>> This is a generic code so I don't want to add a cygwin specific
>>> dependency there. Is there a preprocessor definition for cygwin
>>> version? I could use that to disable HAVE_SUN_ACL for cygwin 2.5+
>> 
>> Pardon me for butting in, but isn't adding a Cygwin version check
>> about as non-generic as it gets?
>> 
>> Wouldn't something like this work:
>> 
>> .../configure ac_cv_func_aclfromtext=no
> 
> Thats a hack :)

I don’t know if that smiley means you’re joking or if you’re just trying to soften a negative judgement, but Peter’s proposal is as far from a hack as it gets.

He is proposing that you write an autoconf test that determines if the platform has this new ACL behavior.  Then in your C code:

   #include <config.h>
   #if HAVE_FUNC_ACLFROMTEXT
   #  include <cygwin/acl.h>
   #endif

Now you’re not dependent on Cygwin header file #defines that don’t exist yet, and will continue to not exist on older Cygwin installs.  You only include the Cygwin header if your autoconf test determines that this is necessary.

This is standard Autoconf practice: check for features, not for platforms or platform versions.  This practice comes from 40+ years of Unix portability experience, which is that platform and version tests often break, but feature tests rarely do.
--
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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Problem with new acl code and cdrtools
  2016-02-09  4:14         ` Warren Young
@ 2016-02-09  7:57           ` Ismail Donmez
  2016-02-09  8:46             ` Warren Young
  2016-02-09  8:57             ` Peter Rosin
  0 siblings, 2 replies; 18+ messages in thread
From: Ismail Donmez @ 2016-02-09  7:57 UTC (permalink / raw)
  To: cygwin

Hi,

On Tue, Feb 9, 2016 at 6:14 AM, Warren Young <wyml@etr-usa.com> wrote:
> On Feb 8, 2016, at 9:59 AM, Ismail Donmez <ismail@i10z.com> wrote:
>>
>> On Mon, Feb 8, 2016 at 6:29 PM, Peter Rosin <peda@lysator.liu.se> wrote:
>>> On 2016-02-08 14:31, Ismail Donmez wrote:
>>>> This is a generic code so I don't want to add a cygwin specific
>>>> dependency there. Is there a preprocessor definition for cygwin
>>>> version? I could use that to disable HAVE_SUN_ACL for cygwin 2.5+
>>>
>>> Pardon me for butting in, but isn't adding a Cygwin version check
>>> about as non-generic as it gets?
>>>
>>> Wouldn't something like this work:
>>>
>>> .../configure ac_cv_func_aclfromtext=no
>>
>> Thats a hack :)
>
> I don’t know if that smiley means you’re joking or if you’re just trying to soften a negative judgement, but Peter’s proposal is as far from a hack as it gets.

What Peter suggests is telling autoconf to assume aclfromtext() does
not exist on the system which is a hack and I already have a hack I
could use.

> He is proposing that you write an autoconf test that determines if the platform has this new ACL behavior.  Then in your C code:
>
>    #include <config.h>
>    #if HAVE_FUNC_ACLFROMTEXT
>    #  include <cygwin/acl.h>
>    #endif

I could check for __cygwin__ instead of that which would do the same thing.

Anyhow the discussion diverged a lot, and for now I'll be using my
simple hack of disabling HAVE_SUN_ACL manually.

ismail

--
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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Problem with new acl code and cdrtools
  2016-02-09  7:57           ` Ismail Donmez
@ 2016-02-09  8:46             ` Warren Young
  2016-02-09  8:50               ` Ismail Donmez
  2016-02-09  8:57             ` Peter Rosin
  1 sibling, 1 reply; 18+ messages in thread
From: Warren Young @ 2016-02-09  8:46 UTC (permalink / raw)
  To: The Cygwin Mailing List

On Feb 9, 2016, at 12:56 AM, Ismail Donmez <ismail@i10z.com> wrote:
> 
> On Tue, Feb 9, 2016 at 6:14 AM, Warren Young <wyml@etr-usa.com> wrote:
>> On Feb 8, 2016, at 9:59 AM, Ismail Donmez <ismail@i10z.com> wrote:
>>> 
>>> Thats a hack :)
>> 
>> Peter’s proposal is as far from a hack as it gets.
> 
> What Peter suggests is telling autoconf to assume aclfromtext() does
> not exist on the system which is a hack and I already have a hack I
> could use.

No.  Once again, he’s suggesting that you write a *test* that checks whether aclfromtext() exists here.  Hypothesis -> test -> decision is science, not assumption or hackery.

>>   #include <config.h>
>>   #if HAVE_FUNC_ACLFROMTEXT
>>   #  include <cygwin/acl.h>
>>   #endif
> 
> I could check for __cygwin__ instead of that which would do the same thing.

Not if it’s Cygwin 1.7.34.
--
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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Problem with new acl code and cdrtools
  2016-02-09  8:46             ` Warren Young
@ 2016-02-09  8:50               ` Ismail Donmez
  0 siblings, 0 replies; 18+ messages in thread
From: Ismail Donmez @ 2016-02-09  8:50 UTC (permalink / raw)
  To: cygwin

On Tue, Feb 9, 2016 at 10:46 AM, Warren Young <wyml@etr-usa.com> wrote:
> On Feb 9, 2016, at 12:56 AM, Ismail Donmez <ismail@i10z.com> wrote:
>>
>> On Tue, Feb 9, 2016 at 6:14 AM, Warren Young <wyml@etr-usa.com> wrote:
>>> On Feb 8, 2016, at 9:59 AM, Ismail Donmez <ismail@i10z.com> wrote:
>>>>
>>>> Thats a hack :)
>>>
>>> Peter’s proposal is as far from a hack as it gets.
>>
>> What Peter suggests is telling autoconf to assume aclfromtext() does
>> not exist on the system which is a hack and I already have a hack I
>> could use.
>
> No.  Once again, he’s suggesting that you write a *test* that checks whether aclfromtext() exists here.  Hypothesis -> test -> decision is science, not assumption or hackery.

The check would succeed for all versions of Cygwin, the hack part is
telling configure to not check for it and assume "no".

ismail

--
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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Problem with new acl code and cdrtools
  2016-02-09  7:57           ` Ismail Donmez
  2016-02-09  8:46             ` Warren Young
@ 2016-02-09  8:57             ` Peter Rosin
  2016-02-09  9:06               ` Ismail Donmez
  1 sibling, 1 reply; 18+ messages in thread
From: Peter Rosin @ 2016-02-09  8:57 UTC (permalink / raw)
  To: cygwin

On 2016-02-09 08:56, Ismail Donmez wrote:
> Hi,
> 
> On Tue, Feb 9, 2016 at 6:14 AM, Warren Young <wyml@etr-usa.com> wrote:
>> On Feb 8, 2016, at 9:59 AM, Ismail Donmez <ismail@i10z.com> wrote:
>>>
>>> On Mon, Feb 8, 2016 at 6:29 PM, Peter Rosin <peda@lysator.liu.se> wrote:
>>>> On 2016-02-08 14:31, Ismail Donmez wrote:
>>>>> This is a generic code so I don't want to add a cygwin specific
>>>>> dependency there. Is there a preprocessor definition for cygwin
>>>>> version? I could use that to disable HAVE_SUN_ACL for cygwin 2.5+
>>>>
>>>> Pardon me for butting in, but isn't adding a Cygwin version check
>>>> about as non-generic as it gets?
>>>>
>>>> Wouldn't something like this work:
>>>>
>>>> .../configure ac_cv_func_aclfromtext=no
>>>
>>> Thats a hack :)
>>
>> I don’t know if that smiley means you’re joking or if you’re just trying to soften a negative judgement, but Peter’s proposal is as far from a hack as it gets.
> 
> What Peter suggests is telling autoconf to assume aclfromtext() does
> not exist on the system which is a hack and I already have a hack I
> could use.
> 
>> He is proposing that you write an autoconf test that determines if the platform has this new ACL behavior.  Then in your C code:
>>
>>    #include <config.h>
>>    #if HAVE_FUNC_ACLFROMTEXT
>>    #  include <cygwin/acl.h>
>>    #endif
> 
> I could check for __cygwin__ instead of that which would do the same thing.
> 
> Anyhow the discussion diverged a lot, and for now I'll be using my
> simple hack of disabling HAVE_SUN_ACL manually.

My take on the situation was that you could disable SUN ACLs by telling
configure that cdrtools should not use aclfromtext(), and that the code
that backs this was already in place. I.e. that you could get a working
build recipe w/o any hacking/patching of cdrtools at all.

I might be misunderstanding something though, but if it works and if
it is considered more of an hack than introducing a cygwin version
check inside the cdrtools package, then that's not my headache.

Just trying to help...

Cheers,
Peter

--
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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Problem with new acl code and cdrtools
  2016-02-09  8:57             ` Peter Rosin
@ 2016-02-09  9:06               ` Ismail Donmez
  2016-02-09 10:13                 ` Peter Rosin
  0 siblings, 1 reply; 18+ messages in thread
From: Ismail Donmez @ 2016-02-09  9:06 UTC (permalink / raw)
  To: cygwin

Hi Peter,

On Tue, Feb 9, 2016 at 10:56 AM, Peter Rosin <peda@lysator.liu.se> wrote:
> My take on the situation was that you could disable SUN ACLs by telling
> configure that cdrtools should not use aclfromtext(), and that the code
> that backs this was already in place. I.e. that you could get a working
> build recipe w/o any hacking/patching of cdrtools at all.
>
> I might be misunderstanding something though, but if it works and if
> it is considered more of an hack than introducing a cygwin version
> check inside the cdrtools package, then that's not my headache.
>
> Just trying to help...

If my reply came out as rude, I am sincerely sorry. As you said yes
this would be a way to fix the situation for Cygwin, but I would be
more happy with a pre-processor macro which we can use for this.

Anyhow.

Thanks,
ismail

--
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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Problem with new acl code and cdrtools
  2016-02-08 19:24       ` Yaakov Selkowitz
@ 2016-02-09  9:36         ` Corinna Vinschen
  0 siblings, 0 replies; 18+ messages in thread
From: Corinna Vinschen @ 2016-02-09  9:36 UTC (permalink / raw)
  To: cygwin

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

On Feb  8 13:24, Yaakov Selkowitz wrote:
> On 2016-02-08 08:10, Corinna Vinschen wrote:
> >Alternatively we could allow to use the Solaris ACL functions even if
> >only including sys/acl.h, given some macro:
> >
> >   sys/acl.h:
> >
> >     #ifdef __USE_OLD_SOLARIS_ACL_FUNCTIONS
> >     # include <cygwin/acl.h>
> >     #else
> >       [...POSIX definitions...]
> >     #endif
> 
> Do the functions or typedefs conflict in any way?

No, they don't.  However, I encountered a problem when exposing the
Solaris API at the same time as the POSIX API via sys/acl.h.  Vim's
autoconf test failed to recognize support for the POSIX API.  Try
this entirely harmless (from the POSIX POV) piece of code:

  #include <sys/types.h>
  #include <sys/acl.h>

  acl_t acl;

  int main ()
  {
    acl = acl_get_file("foo", ACL_TYPE_ACCESS);
    return 0;
  }

Works fine, but now try this with an additional

  #include <cygwin.acl.h>

You'll get an error message:

$ gcc -c acl.c
acl.c:5:7: error: ‘acl’ redeclared as different kind of symbol
   acl_t acl;
         ^
In file included from acl.c:2:0:
/usr/include/cygwin/acl.h:76:13: note: previous declaration of ‘acl’ was here
 extern int  acl (const char *__path, int __cmd, int __nentries,
             ^

The existence of the functions acl and facl is entirely unexpected in
the POSIX context.


Corinna

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Problem with new acl code and cdrtools
  2016-02-09  9:06               ` Ismail Donmez
@ 2016-02-09 10:13                 ` Peter Rosin
  0 siblings, 0 replies; 18+ messages in thread
From: Peter Rosin @ 2016-02-09 10:13 UTC (permalink / raw)
  To: cygwin



On 2016-02-09 10:06, Ismail Donmez wrote:
> Hi Peter,
> 
> On Tue, Feb 9, 2016 at 10:56 AM, Peter Rosin <peda@lysator.liu.se> wrote:
>> My take on the situation was that you could disable SUN ACLs by telling
>> configure that cdrtools should not use aclfromtext(), and that the code
>> that backs this was already in place. I.e. that you could get a working
>> build recipe w/o any hacking/patching of cdrtools at all.
>>
>> I might be misunderstanding something though, but if it works and if
>> it is considered more of an hack than introducing a cygwin version
>> check inside the cdrtools package, then that's not my headache.
>>
>> Just trying to help...
> 
> If my reply came out as rude, I am sincerely sorry. As you said yes
> this would be a way to fix the situation for Cygwin, but I would be
> more happy with a pre-processor macro which we can use for this.

I didn't think it rude, but it is clear that we disagree about what is
a dirty hack and what is generic. Disagreeing isn't necessarily rude :-)

Cheers,
Peter

--
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

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-02-09 10:13 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-08 10:02 Problem with new acl code and cdrtools Ismail Donmez
2016-02-08 13:18 ` Corinna Vinschen
2016-02-08 13:31   ` Ismail Donmez
2016-02-08 14:10     ` Corinna Vinschen
2016-02-08 14:14       ` Ismail Donmez
2016-02-08 14:36         ` Corinna Vinschen
2016-02-08 16:10           ` Ismail Donmez
2016-02-08 19:24       ` Yaakov Selkowitz
2016-02-09  9:36         ` Corinna Vinschen
2016-02-08 16:29     ` Peter Rosin
2016-02-08 17:00       ` Ismail Donmez
2016-02-09  4:14         ` Warren Young
2016-02-09  7:57           ` Ismail Donmez
2016-02-09  8:46             ` Warren Young
2016-02-09  8:50               ` Ismail Donmez
2016-02-09  8:57             ` Peter Rosin
2016-02-09  9:06               ` Ismail Donmez
2016-02-09 10:13                 ` Peter Rosin

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).