[Asterisk-Dev] Module that works in Asterisk 1.0.x and 1.2.x

Martin Harriss martin at Princeton.EDU
Thu Nov 17 13:26:29 MST 2005


Juan Jose Comellas wrote:
> Yes, but ASTERISK_VERSION is a string and it's not usable for conditional 
> compilation. In my current installation it looks like this: 
> "CVS-v1-2-11/17/05-09:29:21". 
> 
> We need something that can used from an #ifdef. ASTERISK_VERSION_NUM is an 
> option, but it's not available in 1.0.x.

Then how about:

#ifdef ASTERISK_VERSION_NUM
# if ASTERISK_VERSION_NUM ...
/* version-specific code */
   ...
# else
/* other version specific code */
   ...
# endif

/* must be version 1.0.x */

   ...

#endif


Martin



More information about the asterisk-dev mailing list