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

Re: [PATCH] #include limts.h for ULONG_MAX

From: Joe Swatosh <joe.swatosh_at_gmail.com>
Date: Tue, 26 Mar 2013 21:53:58 -0700

Okay, thanks for giving me hints on this. As a matter of fact, my apr
does NOT have a section like this. It is just doing a straight up copy
of apr.hw. I've downloaded a few different versions of apr and none of
them have a block like that in apr.hw. Heading over to the apr list
now to ask for more help....

Again thanks for pointing out to me why it's working for everyone else.

--
Joe
On Tue, Mar 26, 2013 at 2:46 AM, Philip Martin
<philip.martin_at_wandisco.com> wrote:
> Joe Swatosh <joe.swatosh_at_gmail.com> writes:
>
>> Thanks Philip and Bert, perhaps this along with Philip's changes?
>>
>> [[[
>> Index: subversion/include/svn_types.h
>> ===================================================================
>> --- subversion/include/svn_types.h      (revision 1460925)
>> +++ subversion/include/svn_types.h      (working copy)
>> @@ -1241,7 +1241,7 @@
>>   *
>>   * @since New in 1.7.
>>   */
>> -#define SVN_LINENUM_MAX_VALUE ULONG_MAX
>> +#define SVN_LINENUM_MAX_VALUE APR_UINT64_MAX
>>
>> ]]]
>
> That's not right for two reasons.  svn_linenum_t is unsigned long and
> that may not be 64 bits; if it's 32 bits we need a 32 bit value.  Also
> this is a public header file and older APR don't define APR_UINT64_MAX.
>
> I don't see any APR constant that gives us the maximum value for an
> unsigned long so I think ULONG_MAX is the only option here.  From your
> earlier patch it appears you need limits.h for that.  What I don't
> understand is that svn_types.h includes apr.h and apr.h should include
> include limits.h.  Does your apr not have
>
> #define APR_HAVE_LIMITS_H        1
>
> /* header files for PATH_MAX, _POSIX_PATH_MAX */
> #if APR_HAVE_LIMITS_H
> #include <limits.h>
> #else
> #if APR_HAVE_SYS_SYSLIMITS_H
> #include <sys/syslimits.h>
> #endif
> #endif
>
> --
> Certified & Supported Apache Subversion Downloads:
> http://www.wandisco.com/subversion/download
Received on 2013-03-27 05:54:34 CET

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