use anonymous namespace for internal linkage and Fix header macro