[asterisk-dev] asterisk_version_num define need to be fixed ?

Russell Bryant russell at digium.com
Tue Jan 9 19:20:57 MST 2007


Matteo Brancaleoni wrote:
> What happens when you want to encode 1.2.8 ?
> 
> #define ASTERISK_VERSION "1.2.8"
> #define ASTERISK_VERSION_NUM 010208
> 
> Ohoh... that's NOT a valid octal constant... tada... every module using
> that preprocessor symbol does not compile anymore :)
> 
> So... that symbol is useless... if you use it your code won't compile on
> 1.2.8, 1.2.9, 1.4.8, 1.4.9 and so on.

You are exactly right.  In fact, I ran into this once myself when helping 
someone with an out of tree module.  I meant to fix it, but ... well ... forgot. 
    Anyway, I have fixed this in the 1.2 and 1.4 branches, and the trunk.  I 
just made the part representing the major version number a single digit instead 
of two.

-- 
Russell Bryant
Software Engineer
Digium, Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: russell.vcf
Type: text/x-vcard
Size: 266 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20070109/0b9df7b1/russell.vcf


More information about the asterisk-dev mailing list