+#else
+ stat <- Posix.getFileStatus name
+ let mode = Posix.fileMode stat
+ let mode1 = modifyBit r mode Posix.ownerReadMode
+ let mode2 = modifyBit w mode1 Posix.ownerWriteMode
+ let mode3 = modifyBit (e || s) mode2 Posix.ownerExecuteMode
+ Posix.setFileMode name mode3
+ where
+ modifyBit :: Bool -> Posix.FileMode -> Posix.FileMode -> Posix.FileMode
+ modifyBit False m b = m .&. (complement b)
+ modifyBit True m b = m .|. b
+#endif