mod: use MACRO for cross-platform code