preproc macro for cross platform compatibility