From dev-return-14662-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Tue Aug 23 19:30:52 2005 Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 23851 invoked from network); 23 Aug 2005 19:30:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Aug 2005 19:30:51 -0000 Received: (qmail 72183 invoked by uid 500); 23 Aug 2005 19:30:50 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 72146 invoked by uid 500); 23 Aug 2005 19:30:49 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 72133 invoked by uid 99); 23 Aug 2005 19:30:49 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Aug 2005 12:30:49 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [128.195.24.168] (HELO scotch.ics.uci.edu) (128.195.24.168) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Aug 2005 12:31:06 -0700 Received: from st-augustin.ics.uci.edu (st-augustin.ics.uci.edu [128.195.20.85]) (authenticated bits=0) by scotch.ics.uci.edu (8.12.11/8.12.11) with ESMTP id j7NJU4FS021648 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 23 Aug 2005 12:30:04 -0700 (PDT) Date: Tue, 23 Aug 2005 12:30:46 -0700 From: Justin Erenkrantz To: Nick Kew , dev@apr.apache.org Subject: Re: Reducing #ifdef burden on APR applications Message-ID: <5E7CE527D0EF10D92A618AE5@st-augustin.ics.uci.edu> In-Reply-To: <200508221335.51169.nick@webthing.com> References: <43071434.8070802@webthing.com> <200508221300.15388.nick@webthing.com> <20050822121213.GA24628@redhat.com> <200508221335.51169.nick@webthing.com> X-Mailer: Mulberry/4.0.3 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Spam-Checker-Version: SpamAssassin 3.1.0-r156655 (2005-03-09) on scotch.ics.uci.edu X-Virus-Scanned: ClamAV version 0.84, clamav-milter version 0.84e on scotch.ics.uci.edu X-Virus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED autolearn=no version=3.1.0-r156655 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --On August 22, 2005 1:35:48 PM +0100 Nick Kew wrote: > I disagree. For example, APR_EOF is an end-condition, not an error. > apr_errno even defines different ranges of codes for different things. > > In practical terms, suppose I implement APR for Platform X, but leave > some parts (which my application doesn't happen to need) > unimplemented, returning APR_ENOTIMPL. Now if we've used APR_ENOTIMPL > for a no-op success, *all apps* that use the feature have lost the > distinction between success and a failure that can't be ignored. Not true. The application can then decide what to do in the presence of the APR_ENOTIMPL case - in this case, we can document that apr_thread_* foo can return APR_ENOTIMPL if the underlying OS doesn't support it. As Jeff said, we let the app (or library) decide what to do from there. -- justin