You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@btopenworld.com> on 2013/11/13 13:19:10 UTC
Re: svn commit: r1540590 - APR_SIZET_MAX is not defined
> URL: http://svn.apache.org/r1540590
> Added: subversion/trunk/subversion/libsvn_subr/object_pool.c
> ==============================================================================
[...]
> +svn_object_pool__create(...,
> + apr_size_t min_unused,
> + apr_size_t max_unused, ...)
[...]
> + /* paranoia limiter code */
> +#if APR_SIZET_MAX > APR_UINT32_MAX
My compiler says:
warning: "APR_SIZET_MAX" is not defined
Presumably that means this block of code is never compiled.
> + if (max_unused > APR_UINT32_MAX)
> + max_unused = APR_UINT32_MAX;
> + if (min_unused > APR_UINT32_MAX)
> + min_unused = APR_UINT32_MAX;
> +#endif
Looks like you meant APR_SIZE_MAX.
I am building against APR 1.4.5.
- Julian
Re: svn commit: r1540590 - APR_SIZET_MAX is not defined
Posted by Stefan Fuhrmann <st...@wandisco.com>.
On Thu, Nov 14, 2013 at 6:13 PM, Branko Čibej <br...@wandisco.com> wrote:
> On 14.11.2013 17:50, Stefan Fuhrmann wrote:
>
> On Wed, Nov 13, 2013 at 1:19 PM, Julian Foad <ju...@btopenworld.com>wrote:
>
>> > URL: http://svn.apache.org/r1540590
>>
>> > Added: subversion/trunk/subversion/libsvn_subr/object_pool.c
>> >
>> ==============================================================================
>> [...]
>> > +svn_object_pool__create(...,
>> > + apr_size_t min_unused,
>> > + apr_size_t max_unused, ...)
>> [...]
>> > + /* paranoia limiter code */
>> > +#if APR_SIZET_MAX > APR_UINT32_MAX
>>
>> My compiler says:
>> warning: "APR_SIZET_MAX" is not defined
>>
>> Presumably that means this block of code is never compiled.
>>
>
> As it turns out, APR_SIZE_MAX can't be used either
> nor anything based on sizeof(). So, I simply removed
> the preprocessor code entirely in r1541924. Compilers
> might complain about it being "always true" on 32 bit
> machines.
>
>
> What's wrong with
>
> # if sizeof(apr_size_t) > sizeof(apr_uint32_t)
>
> I'd expect that to work ...
>
Not in the C preprocessor apparently.
-- Stefan^2.
Re: svn commit: r1540590 - APR_SIZET_MAX is not defined
Posted by Branko Čibej <br...@wandisco.com>.
On 14.11.2013 17:50, Stefan Fuhrmann wrote:
> On Wed, Nov 13, 2013 at 1:19 PM, Julian Foad
> <julianfoad@btopenworld.com <ma...@btopenworld.com>> wrote:
>
> > URL: http://svn.apache.org/r1540590
>
> > Added: subversion/trunk/subversion/libsvn_subr/object_pool.c
> >
> ==============================================================================
> [...]
> > +svn_object_pool__create(...,
> > + apr_size_t min_unused,
> > + apr_size_t max_unused, ...)
> [...]
> > + /* paranoia limiter code */
> > +#if APR_SIZET_MAX > APR_UINT32_MAX
>
> My compiler says:
> warning: "APR_SIZET_MAX" is not defined
>
> Presumably that means this block of code is never compiled.
>
>
> As it turns out, APR_SIZE_MAX can't be used either
> nor anything based on sizeof(). So, I simply removed
> the preprocessor code entirely in r1541924. Compilers
> might complain about it being "always true" on 32 bit
> machines.
What's wrong with
# if sizeof(apr_size_t) > sizeof(apr_uint32_t)
I'd expect that to work ...
-- Brane
--
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane@wandisco.com
Re: svn commit: r1540590 - APR_SIZET_MAX is not defined
Posted by Stefan Fuhrmann <st...@wandisco.com>.
On Wed, Nov 13, 2013 at 1:19 PM, Julian Foad <ju...@btopenworld.com>wrote:
> > URL: http://svn.apache.org/r1540590
>
> > Added: subversion/trunk/subversion/libsvn_subr/object_pool.c
> >
> ==============================================================================
> [...]
> > +svn_object_pool__create(...,
> > + apr_size_t min_unused,
> > + apr_size_t max_unused, ...)
> [...]
> > + /* paranoia limiter code */
> > +#if APR_SIZET_MAX > APR_UINT32_MAX
>
> My compiler says:
> warning: "APR_SIZET_MAX" is not defined
>
> Presumably that means this block of code is never compiled.
>
As it turns out, APR_SIZE_MAX can't be used either
nor anything based on sizeof(). So, I simply removed
the preprocessor code entirely in r1541924. Compilers
might complain about it being "always true" on 32 bit
machines.
-- Stefan^2.
<http://svn.apache.org/r1541924>