Macro "VER" is defined as "((u_long)1)" in some other header file which I can't change.
In my code I need to compose function "test_1" using "test" and the VER. However compiler reported error since it was the "test_((u_long)1)" instead of "test_1" generated.
My question is: How to write macro so that it can generate "test_1"?
Thanks in advance!
#define VER ((u_long)1) /* This is defined in some other header file which I can't change*/
#define paste(x, y, z) x ## y ## z
#define paste2(x, y, z) paste(x, y, z)
#define fcall(fname) paste2(fname, _, VER)
int test_1() {
return 0;
}
int main() {
fcall( test )();
return 0;
}