move some macros out of trinity.h into utils.h