stm: Copy COPT style from unix port.