Made clang happy by taking definitions for the macro out of functions and adding declarations