introduce sopen.. macros for better portability