On 2008-10-05 10:31 +0200, Christian Stimming wrote:
> [..]
> 
> #define AQBANKING_VERSIONNUMBER \
>   10000 * AQBANKING_VERSION_MAJOR \
>   + 100 * AQBANKING_VERSION_MINOR \
>   + AQBANKING_VERSION_PATCHLEVEL
> 
> which enables a condition like this
> 
> #if AQBANKING_VERSIONNUMBER >= 040000
>   // code for aqbanking >= 4.0.0
> #else
>   // older code
> #endif

This would trigger the new code for aqbanking 1.63.84 and above, as
`040000' would be parsed as an octal number.

> which is how they have something available in boost, or like the method in qt 
> which uses the same but in hex,
> 
> #define AQBANKING_VERSIONNUMBER \
>   AQBANKING_VERSION_MAJOR << 32 \
>   + AQBANKING_VERSION_MINOR << 16 \
>   + AQBANKING_VERSION_PATCHLEVEL

I'm not sure this was portable as the preprocessor had to handle
64-bit integers then.

> which gives
> 
> #if AQBANKING_VERSIONNUMBER >= 0x040000
> // ...

Ah, o.k., so s/16/8/g and s/32/16/g (in this order) then for the
define above, which also voids the problem with 64 bit preprocessor
constants ;-)

Ludolf

-- 

Ludolf Holzheid    [ˈluˑ.d̥oːlf ˈhɔlts.haɪd̥]
Heinrichstraße 6   [ˈhaɪn.ʀɪçˌʃtʀɑː.sə 6]
68642 Bürstadt     [68642 ˈbyːʀ.ʃtat]

PGP key fingerprint: 92DC 63E6 B2CD BCFD 8A6C  E390 6306 0DA6 4629 72FB

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Aqbanking-devel mailing list
Aqbanking-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aqbanking-devel

Reply via email to