[Pkg-haskell-commits] darcs: haskell-simple-sendfile: Go back to using sendfile64 everywhere, fixing tests on 32-bit big-endian architectures.
Colin Watson
cjwatson at debian.org
Fri Jul 4 12:41:04 UTC 2014
Fri Jul 4 12:33:12 UTC 2014 Colin Watson <cjwatson at debian.org>
* Go back to using sendfile64 everywhere, fixing tests on 32-bit big-endian architectures.
M ./changelog +7
A ./patches/sendfile64.diff
M ./patches/series +1
Fri Jul 4 12:33:12 UTC 2014 Colin Watson <cjwatson at debian.org>
* Go back to using sendfile64 everywhere, fixing tests on 32-bit big-endian architectures.
diff -rN -u old-haskell-simple-sendfile/changelog new-haskell-simple-sendfile/changelog
--- old-haskell-simple-sendfile/changelog 2014-07-04 12:41:03.863765917 +0000
+++ new-haskell-simple-sendfile/changelog 2014-07-04 12:41:03.895765903 +0000
@@ -1,3 +1,10 @@
+haskell-simple-sendfile (0.2.14-2) UNRELEASED; urgency=medium
+
+ * Go back to using sendfile64 everywhere, fixing tests on 32-bit
+ big-endian architectures.
+
+ -- Colin Watson <cjwatson at debian.org> Fri, 04 Jul 2014 13:32:34 +0100
+
haskell-simple-sendfile (0.2.14-1) unstable; urgency=medium
[ Joachim Breitner ]
diff -rN -u old-haskell-simple-sendfile/patches/sendfile64.diff new-haskell-simple-sendfile/patches/sendfile64.diff
--- old-haskell-simple-sendfile/patches/sendfile64.diff 1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-simple-sendfile/patches/sendfile64.diff 2014-07-04 12:41:03.891765905 +0000
@@ -0,0 +1,46 @@
+Description: Go back to using sendfile64 everywhere
+ GHC is built with -D_FILE_OFFSET_BITS=64 or equivalent, so we need to use
+ sendfile64 to make sure that COff is the same width as the off_t expected
+ by the sendfile* syscall we're calling, since apparently hsc2hs doesn't
+ figure this out for us. 32-bit big-endian architectures fail tests without
+ this, as simple-sendfile ends up poking a 32-bit offset into the most
+ significant half of a 64-bit value.
+Author: Colin Watson <cjwatson at debian.org>
+Forwarded: no
+Last-Update: 2014-07-04
+
+Index: b/Network/Sendfile/BSD.hsc
+===================================================================
+--- a/Network/Sendfile/BSD.hsc
++++ b/Network/Sendfile/BSD.hsc
+@@ -184,7 +184,7 @@
+ poke sentp len
+ c_sendfile fd s off sentp hdrp 0
+
+-foreign import ccall unsafe "sys/uio.h sendfile"
++foreign import ccall unsafe "sys/uio.h sendfile64"
+ c_sendfile :: Fd -> Fd -> COff -> Ptr COff -> Ptr SfHdtr -> CInt -> IO CInt
+
+ isFreeBSD :: Bool
+@@ -196,7 +196,7 @@
+ sendFile fd s off len sentp hdrp =
+ c_sendfile fd s off (fromIntegral len) hdrp sentp 0
+
+-foreign import ccall unsafe "sys/uio.h sendfile"
++foreign import ccall unsafe "sys/uio.h sendfile64"
+ c_sendfile :: Fd -> Fd -> COff -> CSize -> Ptr SfHdtr -> Ptr COff -> CInt -> IO CInt
+
+ isFreeBSD :: Bool
+Index: b/Network/Sendfile/Linux.hsc
+===================================================================
+--- a/Network/Sendfile/Linux.hsc
++++ b/Network/Sendfile/Linux.hsc
+@@ -106,7 +106,7 @@
+ when (left /= 0) $ sendfileloop dst src offp left hook
+
+ -- Dst Src in order. take care
+-foreign import ccall unsafe "sendfile"
++foreign import ccall unsafe "sendfile64"
+ c_sendfile :: Fd -> Fd -> Ptr COff -> CSize -> IO (#type ssize_t)
+
+ ----------------------------------------------------------------
diff -rN -u old-haskell-simple-sendfile/patches/series new-haskell-simple-sendfile/patches/series
--- old-haskell-simple-sendfile/patches/series 2014-07-04 12:41:03.863765917 +0000
+++ new-haskell-simple-sendfile/patches/series 2014-07-04 12:41:03.891765905 +0000
@@ -1,2 +1,3 @@
no-network-conduit.diff
missing-test-file.diff
+sendfile64.diff
More information about the Pkg-haskell-commits
mailing list