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

Re: [PATCH] use apr macros to make cache-membuffer.c more portable

From: Stefan Fuhrmann <stefan.fuhrmann_at_wandisco.com>
Date: Tue, 26 Mar 2013 10:22:00 +0100

On Tue, Mar 26, 2013 at 1:34 AM, Joe Swatosh <joe.swatosh_at_gmail.com> wrote:

> Inspired by Bert's comment in another thread about apr macros
>

Hi Joe,

Thanks for the patch. Committed as 1461030.

-- Stefan^2.

> [[[
> Use apr macros to make code more portable.
>
> * subversion/libsvn_subr/cache-membuffer.c
> (macros): use APR_UINT64_C instead of ull suffix to define
> DEFAULT_MIN_SEGMENT_SIZE, MIN_SEGMENT_SIZE, and MAX_SEGMENT_SIZE.
> ]]]
>
> Index: subversion/libsvn_subr/cache-membuffer.c
> ===================================================================
> --- subversion/libsvn_subr/cache-membuffer.c (revision 1460925)
> +++ subversion/libsvn_subr/cache-membuffer.c (working copy)
> @@ -116,11 +116,11 @@
> /* By default, don't create cache segments smaller than this value unless
> * the total cache size itself is smaller.
> */
> -#define DEFAULT_MIN_SEGMENT_SIZE 0x2000000ull
> +#define DEFAULT_MIN_SEGMENT_SIZE APR_UINT64_C(0x2000000)
>
> /* The minimum segment size we will allow for multi-segmented caches
> */
> -#define MIN_SEGMENT_SIZE 0x10000ull
> +#define MIN_SEGMENT_SIZE APR_UINT64_C(0x10000)
>
> /* The maximum number of segments allowed. Larger numbers reduce the size
> * of each segment, in turn reducing the max size of a cachable item.
> @@ -133,7 +133,7 @@
> /* As of today, APR won't allocate chunks of 4GB or more. So, limit the
> * segment size to slightly below that.
> */
> -#define MAX_SEGMENT_SIZE 0xffff0000ull
> +#define MAX_SEGMENT_SIZE APR_UINT64_C(0xffff0000)
>
> /* We don't mark the initialization status for every group but initialize
> * a number of groups at once. That will allow for a very small init flags
>

-- 
*Join one of our free daily demo sessions on* *Scaling Subversion for the
Enterprise <http://www.wandisco.com/training/webinars>*
*
*
Received on 2013-03-26 12:09:18 CET

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