-- file perms -rwxr-xr-x

setFileMode :: FilePath -> FileMode -> IO ()
setFileMode name m =
  withCString name $ \s -> do
#if __GLASGOW_HASKELL__ >= 608
    throwErrnoPathIfMinus1_ "setFileMode" name (c_chmod s m)
#else
    throwErrnoIfMinus1_                   name (c_chmod s m)
#endif
#else
setFileOrdinary   _ = return ()
setFileExecutable _ = return ()
#endif
setFileMode :: FilePath -> FileMode -> IO ()
setFileMode name m =
  withCString name $ \s -> do
#if __GLASGOW_HASKELL__ >= 608
    throwErrnoPathIfMinus1_ "setFileMode" name (c_chmod s m)
#else
    throwErrnoIfMinus1_                   name (c_chmod s m)
#endif
#else
setFileOrdinary   _ = return ()
setFileExecutable _ = return ()
#endif
setFileMode name m =
  withCString name $ \s -> do
#if __GLASGOW_HASKELL__ >= 608
    throwErrnoPathIfMinus1_ "setFileMode" name (c_chmod s m)
#else
    throwErrnoIfMinus1_                   name (c_chmod s m)
#endif
#else
setFileOrdinary   _ = return ()
setFileExecutable _ = return ()
#endif