This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with new acl code and cdrtools


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]