subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Swatosh <>
Subject [PATCH] use apr macros to make cache-membuffer.c more portable
Date Tue, 26 Mar 2013 00:34:25 GMT
Inspired by Bert's comment in another thread about apr macros

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

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

 /* 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

View raw message