On Thu, Mar 5, 2009 at 11:19, Stefan Sperling <stsp_at_elego.de> wrote:
> On Thu, Mar 05, 2009 at 02:55:26AM +0100, Bert Huijben wrote:
>...
>> > Is there some platform-independent way to test for this?
>> > Something like APR_INTERNAL_CHARSET_IS_ALWAYS_UTF8?
>> > If such a mechanism is not yet provided by APR, shouldn't
>> > we ask them to add it?
>>
>> There is only a runtime check to get the type supported in the current apr
>> versions. For a future apr version it would be nice if they provided an
>> #define, but for the foreseeable future we can't trust the macro to be
>> there.
>
> What's the overhead involved in using the run-time check
> instead of a #define?
>
>> (We currently support Apr 0.9.X-1.3.X and I don't think they are going to
>> backport such a feature request to these old versions).
>
> So the sooner we ask them to add a #define, the better :)
Right. We could do the runtime check (once; stashed into a global)
*unless* we see the #define. That gives us full compatibility, and
will be even faster when the define finally appears.
Cheers,
-g
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1272231
Received on 2009-03-05 14:55:35 CET