adapter: replace common macros