From dev-return-16522-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Mon Jun 05 22:22:28 2006 Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 67364 invoked from network); 5 Jun 2006 22:22:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Jun 2006 22:22:27 -0000 Received: (qmail 13381 invoked by uid 500); 5 Jun 2006 22:22:27 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 13055 invoked by uid 500); 5 Jun 2006 22:22:26 -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 13044 invoked by uid 99); 5 Jun 2006 22:22:25 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Jun 2006 15:22:25 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=UPPERCASE_25_50 X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [207.155.252.12] (HELO sheffield.cnchost.com) (207.155.252.12) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Jun 2006 15:22:24 -0700 Received: from [192.168.0.21] (c-24-15-193-17.hsd1.il.comcast.net [24.15.193.17]) by sheffield.cnchost.com (ConcentricHost(2.54) Relay) with ESMTP id A912137FA for ; Mon, 5 Jun 2006 18:21:59 -0400 (EDT) Message-ID: <4484AE7B.40105@rowe-clan.net> Date: Mon, 05 Jun 2006 17:21:47 -0500 From: "William A. Rowe, Jr." User-Agent: Mozilla Thunderbird 1.0.8-1.1.fc4 (X11/20060501) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@apr.apache.org Subject: Re: svn commit: r411890 - /apr/apr-util/trunk/include/apr_ldap_init.h References: <20060605185438.35C8C1A9842@eris.apache.org> <603AEF1D-D52A-4FC2-ACDD-2E3B01C98CC6@gbiv.com> In-Reply-To: <603AEF1D-D52A-4FC2-ACDD-2E3B01C98CC6@gbiv.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Roy T. Fielding wrote: > On Jun 5, 2006, at 11:54 AM, bnicholes@apache.org wrote: > >> +/** >> + * Macro to detect security related return values. >> + */ >> +#if defined(LDAP_INSUFFICIENT_ACCESS) >> +#define APU_LDAP_INSUFFICIENT_ACCESS LDAP_INSUFFICIENT_ACCESS >> +#elif defined(LDAP_INSUFFICIENT_RIGHTS) >> +#define APU_LDAP_INSUFFICIENT_ACCESS LDAP_INSUFFICIENT_RIGHTS >> +#endif > > Shouldn't that end with > > #else > #define APU_LDAP_INSUFFICIENT_ACCESS (some reasonable default) > #endif > > It seems odd just to leave it undefined. Actually, aren't we leaving out the possiblity that both symbols exist with slightly different meanings? #if defined(LDAP_INSUFFICIENT_RIGHTS) and defined(LDAP_INSUFFICIENT_RIGHTS) #define APU_LDAP_INSUFFICIENT_ACCESS(rc) ((rc == LDAP_INSUFFICIENT_ACCESS) \ || (rc == LDAP_INSUFFICIENT_RIGHTS) We made these mistakes before in httpd which is why apr_errno.h is now the way it is. Bill