[Pkg-haskell-commits] darcs: haskell-system-fileio: releasing version 0.3.8-2
John Millikin
jmillikin at gmail.com
Sun Mar 24 21:28:16 UTC 2013
Sun Mar 24 21:23:33 UTC 2013 John Millikin <jmillikin at gmail.com>
* releasing version 0.3.8-2
Ignore-this: 37ab4de388a3d8885651e28b1cd9f099
M! ./changelog -12 +3
A! ./patches/
A! ./patches/series
A! ./patches/use-native-openfile.diff
A! ./patches/use-posix-bytestring-stat.diff
Sun Mar 24 21:23:33 UTC 2013 John Millikin <jmillikin at gmail.com>
* releasing version 0.3.8-2
Ignore-this: 37ab4de388a3d8885651e28b1cd9f099
diff -rN -u old-haskell-system-fileio//changelog new-haskell-system-fileio//changelog
--- old-haskell-system-fileio//changelog 2013-03-24 21:28:16.827219405 +0000
+++ new-haskell-system-fileio//changelog 2013-03-24 21:28:16.839036785 +0000
@@ -1,12 +1,3 @@
-haskell-system-fileio (0.3.10-1) experimental; urgency=low
-
- * Depend on haskell-devscripts 0.8.13 to ensure this packages is built
- against experimental
- * Bump standards version, no change
- * New upstream release
-
- -- Joachim Breitner <nomeata at debian.org> Wed, 17 Oct 2012 21:01:50 +0200
-
haskell-system-fileio (0.3.8-1) unstable; urgency=low
* Initial release.
diff -rN -u old-haskell-system-fileio//patches/series new-haskell-system-fileio//patches/series
--- old-haskell-system-fileio//patches/series 1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-system-fileio//patches/series 2013-03-24 21:28:16.839036785 +0000
@@ -0,0 +1,2 @@
+use-posix-bytestring-stat.diff
+use-native-openfile.diff
diff -rN -u old-haskell-system-fileio//patches/use-native-openfile.diff new-haskell-system-fileio//patches/use-native-openfile.diff
--- old-haskell-system-fileio//patches/use-native-openfile.diff 1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-system-fileio//patches/use-native-openfile.diff 2013-03-24 21:28:16.839036785 +0000
@@ -0,0 +1,34 @@
+--- a/lib/Filesystem.hs
++++ b/lib/Filesystem.hs
+@@ -73,12 +73,6 @@
+ , rename
+ ) where
+
+-#ifndef CABAL_OS_WINDOWS
+-#if MIN_VERSION_base(4,2,0)
+-#define SYSTEMFILEIO_LOCAL_OPEN_FILE
+-#endif
+-#endif
+-
+ import Prelude hiding (FilePath, readFile, writeFile, appendFile)
+
+ import qualified Control.Exception as Exc
+--- a/system-fileio.cabal
++++ b/system-fileio.cabal
+@@ -65,6 +65,8 @@
+ build-depends:
+ unix >= 2.3 && < 2.6
+ c-sources: lib/hssystemfileio-unix.c
++ if impl(ghc >= 7.2.0) && impl(ghc < 7.4.0)
++ cpp-options: -DSYSTEMFILEIO_LOCAL_OPEN_FILE
+
+ exposed-modules:
+ Filesystem
+--- a/tests/system-fileio-tests.cabal
++++ b/tests/system-fileio-tests.cabal
+@@ -40,3 +40,5 @@
+ build-depends:
+ unix >= 2.3 && < 2.6
+ c-sources: ../lib/hssystemfileio-unix.c
++ if impl(ghc >= 7.2.0) && impl(ghc < 7.4.0)
++ cpp-options: -DSYSTEMFILEIO_LOCAL_OPEN_FILE
diff -rN -u old-haskell-system-fileio//patches/use-posix-bytestring-stat.diff new-haskell-system-fileio//patches/use-posix-bytestring-stat.diff
--- old-haskell-system-fileio//patches/use-posix-bytestring-stat.diff 1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-system-fileio//patches/use-posix-bytestring-stat.diff 2013-03-24 21:28:16.839036785 +0000
@@ -0,0 +1,40 @@
+--- a/lib/Filesystem.hs
++++ b/lib/Filesystem.hs
+@@ -118,6 +118,9 @@
+ import Data.Time.Clock.POSIX (posixSecondsToUTCTime)
+ import qualified System.Posix as Posix
+ import qualified System.Posix.Error as Posix
++#if MIN_VERSION_unix(2,5,1)
++import qualified System.Posix.Files.ByteString
++#endif
+
+ #endif
+
+@@ -952,6 +955,12 @@
+ _ <- throwErrnoPathIfRetry failed loc path io
+ return ()
+
++posixStat :: String -> FilePath -> IO Posix.FileStatus
++#if MIN_VERSION_unix(2,5,1)
++posixStat _ path = System.Posix.Files.ByteString.getFileStatus (R.encode R.posix path)
++#else
++posixStat loc path = withFd loc path Posix.getFdStatus
++
+ withFd :: String -> FilePath -> (Posix.Fd -> IO a) -> IO a
+ withFd fnName path = Exc.bracket open close where
+ open = withFilePath path $ \cpath -> do
+@@ -959,12 +968,11 @@
+ return (Posix.Fd fd)
+ close = Posix.closeFd
+
+-posixStat :: String -> FilePath -> IO Posix.FileStatus
+-posixStat loc path = withFd loc path Posix.getFdStatus
+-
+ foreign import ccall unsafe "open"
+ c_open :: CString -> CInt -> IO CInt
+
++#endif
++
+ foreign import ccall unsafe "free"
+ c_free :: Ptr a -> IO ()
+
More information about the Pkg-haskell-commits
mailing list