You want the "token pasting" operator, but it can get tricky when one of the operands is a parameter or a macro. This worked for me:
#define THETYPE uint32_t
#define ADDSUFFIX_2(x,y) x ## y
#define ADDSUFFIX_1(x,y) ADDSUFFIX_2(x,y)
#define ADDSUFFIX(x) ADDSUFFIX_1(x,THETYPE)
THETYPE * ADDSUFFIX(getvalue) (THETYPE * pMem) {}
If you want getvalue_uint32_t, this works:
#define ADDSUFFIX(x) ADDSUFFIX_1(x ## _,THETYPE)
Also consider:
#define MKFUNC(type,func,param) \
type * ADDSUFFIX_1(func ## _,type) (type * param)
MKFUNC(uint32_t,getvalue,pMem) { }