change function name
move typedef to macro protected