Add checks and local definitions for all T_xxx macros, not just a few