I'll try to answer your question assuming that what you're asking can be rephrazed as:
I am updating a thread migration system in C, and am not able to make a specific feature in my package backward compatible. I'm thinking of doing this by using a defined constant such as "MYPACK_VER" so that an application using my package can do the following:
Code:
#if MYPACK_VER > 3.0
use the new format of the feature
#else
use the old format of the feature
#endif
Given this interpretation of your question, the answer is quite simple -- define the symbol MYPACK_VER in the header file for yor package, as in:
Code:
#define MYPACK_VER 3.1 /* versions 3.0 and lower do it the old way */
Applications that depend on the library can then do something like the following:
Code:
#include "mypack.h" /* use the thread migration package */
#ifndef MYPACK_VER
#define MYPACK_VER 1 /* If the version is not defined, it's an early version */
#endif
...
#if MYPACK_VER > 3.0
use new facility
#else
use old facility
#endif
Does this help?