I am trying to write a program where the names of some functions are dependent on the value of a certain macro variable with a macro like this:
#define VARIA
#define VARIABLE 3
#define NAME2(fun,suffix) fun ## _ ## suffix
#define NAME1(fun,suffix) NAME2(fun,suffix)
#define NAME(fun) NAME1(fun,VARIABLE)
int NAME(some_function)(int a);
Honestly, you don't want to know why this works. If you know why it works, you'll become that guy at work who knows this sort of thing, and everyone will come ask you questions. =)
Edit: if you actually want to know why it works, I'll happily post an explanation, assuming no one beats me to it.