On Tue, Apr 20, 2010 at 05:04, <rhuij...@apache.org> wrote: > Author: rhuijben > Date: Tue Apr 20 09:04:27 2010 > New Revision: 935837 > > URL: http://svn.apache.org/viewvc?rev=935837&view=rev > Log: > Following up on r935829, replace usages of apr_uintptr_t with apr_size_t, > to fix the build on older apr versions. (It would be nice if apr used the > same @since convention as Subversion).
You don't need apr_uintptr_t here. That type is used to stash a pointer into an integer type. What you really want to do is something like: apr_size_t amt = (apr_size_t)((char *)ptr1 - (char *)ptr2); >... > +++ subversion/trunk/subversion/libsvn_subr/dirent_uri.c Tue Apr 20 09:04:27 > 2010 > @@ -560,9 +560,9 @@ canonicalize(path_type_t type, const cha > > if (need_extra > 0) > { > - apr_size_t pre_schema_size = (apr_uintptr_t)schema_data - > (apr_uintptr_t)canon; > + apr_size_t pre_schema_size = (apr_size_t)schema_data - > (apr_size_t)canon; pre_schema_size = (apr_size_t)(schema_data - canon); > > - dst = apr_palloc(pool, (apr_uintptr_t)src - (apr_uintptr_t)canon + > need_extra + 1); > + dst = apr_palloc(pool, (apr_size_t)src - (apr_size_t)canon + > need_extra + 1); (apr_size_t)(src - canon) + need_extra + 1 > memcpy(dst, canon, pre_schema_size); > canon = dst; > > > >