[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: Joe Swatosh <joe.swatosh_at_gmail.com>
Date: Tue, 26 Mar 2013 19:59:50 -0700

Thanks!

--
Joe
On Tue, Mar 26, 2013 at 2:22 AM, Stefan Fuhrmann
<stefan.fuhrmann_at_wandisco.com> wrote:
> 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
Received on 2013-03-27 04:00:23 CET

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.