handle SH_COMPAT macro more right way