aboutsummaryrefslogtreecommitdiffhomepage
path: root/System/Posix/Files.hsc
diff options
context:
space:
mode:
authorGravatar wolfgang <unknown>2002-10-08 08:03:02 +0000
committerGravatar wolfgang <unknown>2002-10-08 08:03:02 +0000
commit1af096d3e286498e531ecb0542bd26997ab5fe06 (patch)
treed1e9b3fc0081cc7dceddee091788f8ba0003451d /System/Posix/Files.hsc
parentd637529b092d9b81dd5518c11662e7971716f9f8 (diff)
[project @ 2002-10-08 08:03:02 by wolfgang]
Make the new Posix bindings compile on Mac OS X. Most notable, Mac OS X lacks *) lchown *) SIGPOLL I don't know of a replacement of either, so they are just left out when they are not detected by configure.
Diffstat (limited to 'System/Posix/Files.hsc')
-rw-r--r--System/Posix/Files.hsc7
1 files changed, 6 insertions, 1 deletions
diff --git a/System/Posix/Files.hsc b/System/Posix/Files.hsc
index 69e4924..cc9312b 100644
--- a/System/Posix/Files.hsc
+++ b/System/Posix/Files.hsc
@@ -55,7 +55,10 @@ module System.Posix.Files (
rename,
-- * Changing file ownership
- setOwnerAndGroup, setFdOwnerAndGroup, setSymbolicLinkOwnerAndGroup,
+ setOwnerAndGroup, setFdOwnerAndGroup,
+#if HAVE_LCHOWN
+ setSymbolicLinkOwnerAndGroup,
+#endif
-- * Changing file timestamps
setFileTimes, touchFile,
@@ -384,6 +387,7 @@ setFdOwnerAndGroup (Fd fd) uid gid =
foreign import ccall unsafe "fchown"
c_fchown :: CInt -> CUid -> CGid -> IO CInt
+#if HAVE_LCHOWN
setSymbolicLinkOwnerAndGroup :: FilePath -> UserID -> GroupID -> IO ()
setSymbolicLinkOwnerAndGroup name uid gid = do
withCString name $ \s ->
@@ -391,6 +395,7 @@ setSymbolicLinkOwnerAndGroup name uid gid = do
foreign import ccall unsafe "lchown"
c_lchown :: CString -> CUid -> CGid -> IO CInt
+#endif
-- -----------------------------------------------------------------------------
-- utime()