Although the decision will force you to change function names, it will be a compromise between your old users and your new ones.
So - rename the old foo to deprecatedFoo and your new foo to foo2 (or whatever). Then, in the header file that you include in your library, you can simply:
#define deprecatedFoo foo
and inside the do function itself:
#warning ("This function is deprecated. Use 'foo2' or change the #define in LINE in file HEADER.")
Users of older versions will not have to change their code and a warning will be issued, and new users will probably listen and modify #define to use the new foo .
In the next version, you just delete the old foo and define .
source share