Rename exception macros to avoid conflicts, correct some of the decls.