Fix deprecation warnings of macros