fix #2364, type defs in macros