aboutsummaryrefslogtreecommitdiffhomepage
path: root/System
diff options
context:
space:
mode:
Diffstat (limited to 'System')
-rw-r--r--System/Posix/Directory.hsc4
-rw-r--r--System/Posix/Directory/ByteString.hsc4
-rw-r--r--System/Posix/Directory/Common.hsc8
3 files changed, 16 insertions, 0 deletions
diff --git a/System/Posix/Directory.hsc b/System/Posix/Directory.hsc
index 71a70ce..d0ef4c0 100644
--- a/System/Posix/Directory.hsc
+++ b/System/Posix/Directory.hsc
@@ -29,8 +29,12 @@ module System.Posix.Directory (
rewindDirStream,
closeDirStream,
DirStreamOffset,
+#ifdef HAVE_TELLDIR
tellDirStream,
+#endif
+#ifdef HAVE_SEEKDIR
seekDirStream,
+#endif
-- * The working dirctory
getWorkingDirectory,
diff --git a/System/Posix/Directory/ByteString.hsc b/System/Posix/Directory/ByteString.hsc
index 3ac642b..bb9100c 100644
--- a/System/Posix/Directory/ByteString.hsc
+++ b/System/Posix/Directory/ByteString.hsc
@@ -29,8 +29,12 @@ module System.Posix.Directory.ByteString (
rewindDirStream,
closeDirStream,
DirStreamOffset,
+#ifdef HAVE_TELLDIR
tellDirStream,
+#endif
+#ifdef HAVE_SEEKDIR
seekDirStream,
+#endif
-- * The working dirctory
getWorkingDirectory,
diff --git a/System/Posix/Directory/Common.hsc b/System/Posix/Directory/Common.hsc
index a608be3..7e2dfc6 100644
--- a/System/Posix/Directory/Common.hsc
+++ b/System/Posix/Directory/Common.hsc
@@ -22,8 +22,12 @@ module System.Posix.Directory.Common (
DirStream(..), CDir, CDirent, DirStreamOffset(..),
rewindDirStream,
closeDirStream,
+#ifdef HAVE_SEEKDIR
seekDirStream,
+#endif
+#ifdef HAVE_TELLDIR
tellDirStream,
+#endif
changeWorkingDirectoryFd,
) where
@@ -57,13 +61,16 @@ foreign import ccall unsafe "closedir"
newtype DirStreamOffset = DirStreamOffset COff
+#ifdef HAVE_SEEKDIR
seekDirStream :: DirStream -> DirStreamOffset -> IO ()
seekDirStream (DirStream dirp) (DirStreamOffset off) =
c_seekdir dirp off
foreign import ccall unsafe "seekdir"
c_seekdir :: Ptr CDir -> COff -> IO ()
+#endif
+#ifdef HAVE_TELLDIR
tellDirStream :: DirStream -> IO DirStreamOffset
tellDirStream (DirStream dirp) = do
off <- c_telldir dirp
@@ -71,6 +78,7 @@ tellDirStream (DirStream dirp) = do
foreign import ccall unsafe "telldir"
c_telldir :: Ptr CDir -> IO COff
+#endif
changeWorkingDirectoryFd :: Fd -> IO ()
changeWorkingDirectoryFd (Fd fd) =