I am writing a thread migration system in C. And I am not able to make a feature in my package backward compatible, so I am thinking of predefining a constant like MYPACK_VER so that an application of my package can do this:
#if MYPACK_VER > 3.0
use the new format of a feature
#else
use the old format of a feature
#endif
So it is somewhat similiar to what a compiler would do - for example, GCC defines a VERSION macro so that I guess if a C programmer wants to use a feature that is only provided after GCC version 3.4.4, he can enclose that feature with #if VERSION>3.4.4 / #endif.
How can I do that in my thread migration system?



LinkBack URL
About LinkBacks


