add GLOBAL_HIDDEN_FN macro to reduce redundancy