Use macros rather than ifdefs