[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r21561 - in trunk/subversion: include libsvn_client libsvn_subr

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2006-09-20 11:27:02 CEST

Forgot to mention tested the same with 0.9.7 APR and 1.3.0 APR and it
works accordingly.

With regards
Kamesh Jayachandran
Kamesh Jayachandran wrote:
> Attaching AC_CHECK_FUNC based fix.
>
> With regards
> Kamesh Jayachandran
> Kamesh Jayachandran wrote:
>> David Glasser wrote:
>>> On 9/19/06, dlr@tigris.org <dlr@tigris.org> wrote:
>>>> --- trunk/subversion/libsvn_subr/hash.c (original)
>>>> +++ trunk/subversion/libsvn_subr/hash.c Tue Sep 19 15:42:07 2006
>>>> @@ -21,6 +21,7 @@
>>>> #include <stdlib.h>
>>>> #include <limits.h>
>>>> #include <assert.h>
>>>> +#include <apr_version.h>
>>>> #include <apr_pools.h>
>>>> #include <apr_hash.h>
>>>> #include <apr_file_io.h>
>>>> @@ -429,3 +430,25 @@
>>>>
>>>> return SVN_NO_ERROR;
>>>> }
>>>> +
>>>> +
>>>> +/*** Misc. hash APIs ***/
>>>> +
>>>> +svn_error_t *
>>>> +svn_hash_clear(apr_hash_t *hash)
>>>> +{
>>>> +#if APR_VERSION_AT_LEAST(1, 3, 0)
>>>
>>> APR_VERSION_AT_LEAST is new in 1.3.0, so this breaks the build for
>>> pre-1.3.0.
>>>
>>> I am committing a quick fix to change this to "#ifdef
>>> APR_VERSION_AT_LEAST" to preserve the ability to build trunk; somebody
>>> who knows APR better than me might want to make a better change.
>>> (#ifdef does work for macros, right?)
>>>
>>> --dave
>>>
>> I don't think.
>> I believe having AC_CHECK_FUNC based 'apr_hash_clear' detection
>> should be the way to go.
>> I am cooking the same.
>>
>> With regards
>> Kamesh Jayachandran
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
>> For additional commands, e-mail: dev-help@subversion.tigris.org
>>
>
> ------------------------------------------------------------------------
>
> Index: subversion/libsvn_subr/hash.c
> ===================================================================
> --- subversion/libsvn_subr/hash.c (revision 21564)
> +++ subversion/libsvn_subr/hash.c (working copy)
> @@ -32,6 +32,7 @@
> #include "svn_sorts.h"
> #include "svn_io.h"
> #include "svn_pools.h"
> +#include "svn_private_config.h"
>
>
>
> @@ -437,7 +438,7 @@
> svn_error_t *
> svn_hash_clear(apr_hash_t *hash)
> {
> -#ifdef APR_VERSION_AT_LEAST
> +#ifdef HAVE_APR_HASH_CLEAR
> apr_hash_clear(hash);
> #else
> apr_hash_index_t *hi;
> Index: build/ac-macros/apr.m4
> ===================================================================
> --- build/ac-macros/apr.m4 (revision 21564)
> +++ build/ac-macros/apr.m4 (working copy)
> @@ -59,6 +59,12 @@
> AC_MSG_ERROR([apr-config --cflags failed])
> fi
>
> + dnl APR_LINK_SWITCH
> + LDFLAGS="$LDFLAGS `$apr_config --link-ld`"
> + AC_CHECK_FUNC(apr_hash_clear, AC_DEFINE(HAVE_APR_HASH_CLEAR,,
> + [Define if we have apr_hash_clear in apr]))
> +
> + dnl Actual LDFLAGS
> LDFLAGS="$LDFLAGS `$apr_config --ldflags`"
> if test $? -ne 0; then
> AC_MSG_ERROR([apr-config --ldflags failed])
>
> ------------------------------------------------------------------------
>
> [[[
> Patch by: Kamesh Jayachandran <kamesh@collab.net>
>
> Follow up to 'compile failures with versions of APR older than 1.3.0'
> caused by r21561.
>
> * subversion/libsvn_subr/hash.c
> Including svn_private_config.h.
> (svn_hash_clear): use 'configure' detected 'HAVE_APR_HASH_FUNC' to decide
> about the availability of 'apr_hash_clear'.
> * build/ac-macros/apr.m4
> (SVN_LIB_APR): Check for 'apr_hash_clear', if available set
> HAVE_APR_HASH_CLEAR.
> ]]]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Sep 20 11:26:43 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.