[PATCH] Remove telldir and seekdir for android, because they do not exist

Nathan nathan.huesken at posteo.de
Thu Jan 24 15:40:52 CET 2013


---
 System/Posix/Directory.hsc            |    3 +++
 System/Posix/Directory/ByteString.hsc |    3 +++
 System/Posix/Directory/Common.hsc     |    6 ++++++
 3 files changed, 12 insertions(+)

diff --git a/System/Posix/Directory.hsc b/System/Posix/Directory.hsc
index 71a70ce..5fcdca3 100644
--- a/System/Posix/Directory.hsc
+++ b/System/Posix/Directory.hsc
@@ -29,8 +29,11 @@ module System.Posix.Directory (
    rewindDirStream,   
    closeDirStream,
    DirStreamOffset,
+   -- no telldir/seekdir support on android
+#ifndef __ANDROID__
    tellDirStream,
    seekDirStream,
+#endif
 
    -- * The working dirctory
    getWorkingDirectory,
diff --git a/System/Posix/Directory/ByteString.hsc b/System/Posix/Directory/ByteString.hsc
index 3ac642b..1b191a2 100644
--- a/System/Posix/Directory/ByteString.hsc
+++ b/System/Posix/Directory/ByteString.hsc
@@ -29,8 +29,11 @@ module System.Posix.Directory.ByteString (
    rewindDirStream,   
    closeDirStream,
    DirStreamOffset,
+   -- No telldir/seekdir support on android
+#ifndef __ANDROID__
    tellDirStream,
    seekDirStream,
+#endif
 
    -- * The working dirctory
    getWorkingDirectory,
diff --git a/System/Posix/Directory/Common.hsc b/System/Posix/Directory/Common.hsc
index a608be3..4d78670 100644
--- a/System/Posix/Directory/Common.hsc
+++ b/System/Posix/Directory/Common.hsc
@@ -22,8 +22,11 @@ module System.Posix.Directory.Common (
        DirStream(..), CDir, CDirent, DirStreamOffset(..),
        rewindDirStream,
        closeDirStream,
+	   -- no telldir/seekdir support on android
+#ifndef __ANDROID__
        seekDirStream,
        tellDirStream,
+#endif
        changeWorkingDirectoryFd,
   ) where
 
@@ -57,6 +60,8 @@ foreign import ccall unsafe "closedir"
 
 newtype DirStreamOffset = DirStreamOffset COff
 
+-- not supported on android
+#ifndef __ANDROID__
 seekDirStream :: DirStream -> DirStreamOffset -> IO ()
 seekDirStream (DirStream dirp) (DirStreamOffset off) =
   c_seekdir dirp off
@@ -71,6 +76,7 @@ tellDirStream (DirStream dirp) = do
 
 foreign import ccall unsafe "telldir"
   c_telldir :: Ptr CDir -> IO COff
+#endif
 
 changeWorkingDirectoryFd :: Fd -> IO ()
 changeWorkingDirectoryFd (Fd fd) = 
-- 
1.7.10.4


--------------070004030200010403000704--



More information about the ghc-devs mailing list