From commits-return-10266-apmail-apr-commits-archive=apr.apache.org@apr.apache.org Sun Mar 08 23:45:49 2009 Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 53292 invoked from network); 8 Mar 2009 23:45:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Mar 2009 23:45:49 -0000 Received: (qmail 71979 invoked by uid 500); 8 Mar 2009 23:45:48 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 71938 invoked by uid 500); 8 Mar 2009 23:45:48 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 71929 invoked by uid 99); 8 Mar 2009 23:45:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Mar 2009 16:45:48 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Mar 2009 23:45:46 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 4F9402388920; Sun, 8 Mar 2009 23:45:25 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r751555 - in /apr/apr-util/branches/1.2.x: CHANGES include/apr_ldap.h.in include/apr_ldap.hw Date: Sun, 08 Mar 2009 23:45:25 -0000 To: commits@apr.apache.org From: covener@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090308234525.4F9402388920@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: covener Date: Sun Mar 8 23:45:24 2009 New Revision: 751555 URL: http://svn.apache.org/viewvc?rev=751555&view=rev Log: backport r751456 from trunk: It's not safe to ask an SDK that doesn't define LDAP_DEFAULT_LIMIT to use -1, because it might put it on the wire as an unsigned int. We previously special-cased this for the MSSDK, but it needs to be more general. PR23356 Modified: apr/apr-util/branches/1.2.x/CHANGES apr/apr-util/branches/1.2.x/include/apr_ldap.h.in apr/apr-util/branches/1.2.x/include/apr_ldap.hw Modified: apr/apr-util/branches/1.2.x/CHANGES URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.2.x/CHANGES?rev=751555&r1=751554&r2=751555&view=diff ============================================================================== --- apr/apr-util/branches/1.2.x/CHANGES [utf-8] (original) +++ apr/apr-util/branches/1.2.x/CHANGES [utf-8] Sun Mar 8 23:45:24 2009 @@ -2,6 +2,11 @@ Changes with APR-util 1.2.13 + *) APR_LDAP_SIZELIMIT should prefer LDAP_DEFAULT_LIMIT/-1 when the + SDK supports it, but in the absence of LDAP_DEFAULT_LIMIT (and + LDAP_NO_LIMIT/0) it is not safe to use a literal -1. + PR23356 [Eric Covener] + *) Better error detection for bucket allocation failures. [Jim Jagielski] Modified: apr/apr-util/branches/1.2.x/include/apr_ldap.h.in URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.2.x/include/apr_ldap.h.in?rev=751555&r1=751554&r2=751555&view=diff ============================================================================== --- apr/apr-util/branches/1.2.x/include/apr_ldap.h.in (original) +++ apr/apr-util/branches/1.2.x/include/apr_ldap.h.in Sun Mar 8 23:45:24 2009 @@ -97,15 +97,19 @@ /* * For ldap function calls that input a size limit on the number of returned elements * Some SDKs do not have the define for LDAP_DEFAULT_LIMIT (-1) or LDAP_NO_LIMIT (0) + * LDAP_DEFAULT_LIMIT is preferred as it allows inheritance from whatever the SDK + * or process is configured for. */ -#if APR_HAS_ZOS_LDAPSDK -#define APR_LDAP_SIZELIMIT LDAP_NO_LIMIT -#else #ifdef LDAP_DEFAULT_LIMIT #define APR_LDAP_SIZELIMIT LDAP_DEFAULT_LIMIT #else -#define APR_LDAP_SIZELIMIT -1 /* equivalent to LDAP_DEFAULT_LIMIT */ +#ifdef LDAP_NO_LIMIT +#define APR_LDAP_SIZELIMIT LDAP_NO_LIMIT +#endif #endif + +#ifndef APR_LDAP_SIZELIMIT +#define APR_LDAP_SIZELIMIT 0 /* equivalent to LDAP_NO_LIMIT, and what goes on the wire */ #endif /* Modified: apr/apr-util/branches/1.2.x/include/apr_ldap.hw URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.2.x/include/apr_ldap.hw?rev=751555&r1=751554&r2=751555&view=diff ============================================================================== --- apr/apr-util/branches/1.2.x/include/apr_ldap.hw (original) +++ apr/apr-util/branches/1.2.x/include/apr_ldap.hw Sun Mar 8 23:45:24 2009 @@ -90,9 +90,20 @@ /* * For ldap function calls that input a size limit on the number of returned elements * Some SDKs do not have the define for LDAP_DEFAULT_LIMIT (-1) or LDAP_NO_LIMIT (0) + * LDAP_DEFAULT_LIMIT is preferred as it allows inheritance from whatever the SDK + * or process is configured for. */ +#ifdef LDAP_DEFAULT_LIMIT +#define APR_LDAP_SIZELIMIT LDAP_DEFAULT_LIMIT +#else +#ifdef LDAP_NO_LIMIT #define APR_LDAP_SIZELIMIT LDAP_NO_LIMIT +#endif +#endif +#ifndef APR_LDAP_SIZELIMIT +#define APR_LDAP_SIZELIMIT 0 /* equivalent to LDAP_NO_LIMIT, and what goes on the wire */ +#endif /* Note: Macros defining const casting has been removed in APR v1.0, * pending real support for LDAP v2.0 toolkits.