#if _WINDOWS_ #define Alloc(x,y,z) GlobalAlloc(x,y) #else #define Alloc(x,y,z) malloc(x,y) #endif void func() { t = Alloc(bla, bla, bla); }