X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:content-type:mime-version:subject:from
	:in-reply-to:date:content-transfer-encoding:message-id
	:references:to; q=dns; s=default; b=KMssZpbPV6dd9OnUSnMrxIAlMrSE
	3r63ytYzK/v4tshDO1xBAm51UEPl7Kkre+WkcuhQs0i8IWbskfu9nsmhT7be52OE
	7fFxassuSvSbnd1h52dTiZS7XEXyWOk8IM7BdIVCT0TS/HPYh9Y0uOgh7E1QJyAp
	dv4K4V5DKNv7Ujk=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:content-type:mime-version:subject:from
	:in-reply-to:date:content-transfer-encoding:message-id
	:references:to; s=default; bh=7hHj27yqhNOQW/4oWeNE3OQrZKI=; b=Tm
	tIbvxsVZjJftCVOUQXa7teD1DG5DClnWxtasphRC4nRK99dlfOPgEBx3NJjMpXoj
	zAJWlfkpWXSJ9cYdohp+RvEiQEB20GrEwfhj0cHhLJ3IBEdjYyh11DSieiJmSD3b
	8+14OHgIt8UWcBKHs1brflHoLYgVu2sMN6spBhrfc=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=AWL,BAYES_05,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=H*i:sk:CAFo71_, H*MI:sk:56B8C25, H*i:Bx_bvbzGvVCs, H*i:sk:jj4r9Ax
X-HELO: etr-usa.com
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\))
Subject: Re: Problem with new acl code and cdrtools
From: Warren Young <wyml@etr-usa.com>
In-Reply-To: <CAFo71_4eQ2VMypAnC=Bx_bvbzGvVCs=jj4r9Ax6GDbgaH1zGOQ@mail.gmail.com>
Date: Mon, 8 Feb 2016 21:14:10 -0700
Message-Id: <CA0C06F1-A50D-4DBF-AB58-AADCE3D9F9F4@etr-usa.com>
References: <CAFo71_4fDB3WkhXTL7eybNzKh2idVF1UHb7oJjaxFshcS9BFUg@mail.gmail.com> <20160208131835.GC12975@calimero.vinschen.de> <CAFo71_5=KT=kJY-wz0EZWZ_LBriCjX2s6=5PSVhHRSxx-A92qg@mail.gmail.com> <56B8C25F.7050206@lysator.liu.se> <CAFo71_4eQ2VMypAnC=Bx_bvbzGvVCs=jj4r9Ax6GDbgaH1zGOQ@mail.gmail.com>
To: The Cygwin Mailing List <cygwin@cygwin.com>
X-IsSubscribed: yes
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id u194EPYB016613

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


