[Pkg-haskell-commits] darcs: haskell-hashable: Drop patch to disable mmap on some architectures; instead, call it through a C helper, fixing problems with the type of the offset argument on some architectures.
Colin Watson
cjwatson at debian.org
Sat May 9 20:01:15 UTC 2015
Sat May 9 19:56:38 UTC 2015 Colin Watson <cjwatson at debian.org>
* Drop patch to disable mmap on some architectures; instead, call it through a C helper, fixing problems with the type of the offset argument on some architectures.
M ./changelog +8
R ./patches/disable_mmap_on_some_arches
A ./patches/fix-mmap.patch
M ./patches/series -1 +1
Sat May 9 19:56:38 UTC 2015 Colin Watson <cjwatson at debian.org>
* Drop patch to disable mmap on some architectures; instead, call it through a C helper, fixing problems with the type of the offset argument on some architectures.
diff -rN -u old-haskell-hashable/changelog new-haskell-hashable/changelog
--- old-haskell-hashable/changelog 2015-05-09 20:01:15.328654952 +0000
+++ new-haskell-hashable/changelog 2015-05-09 20:01:15.336654956 +0000
@@ -1,3 +1,11 @@
+haskell-hashable (1.2.3.2-3) UNRELEASED; urgency=medium
+
+ * Drop patch to disable mmap on some architectures; instead, call it
+ through a C helper, fixing problems with the type of the offset argument
+ on some architectures.
+
+ -- Colin Watson <cjwatson at debian.org> Sat, 09 May 2015 20:53:09 +0100
+
haskell-hashable (1.2.3.2-2) unstable; urgency=medium
* Upload to unstable
diff -rN -u old-haskell-hashable/patches/disable_mmap_on_some_arches new-haskell-hashable/patches/disable_mmap_on_some_arches
--- old-haskell-hashable/patches/disable_mmap_on_some_arches 2015-05-09 20:01:15.328654952 +0000
+++ new-haskell-hashable/patches/disable_mmap_on_some_arches 1970-01-01 00:00:00.000000000 +0000
@@ -1,18 +0,0 @@
-Description: disable calls to mmap() on some arches
-That is armel, armhf, mips, mipsel and powerpc, where mmap fails with EINVAL.
-Author: Louis Bettens <louis at bettens.info>
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-Index: hashable-1.2.3.2/hashable.cabal
-===================================================================
---- hashable-1.2.3.2.orig/hashable.cabal 2015-04-06 12:56:09.854973988 +0200
-+++ hashable-1.2.3.2/hashable.cabal 2015-04-06 12:56:09.850973899 +0200
-@@ -79,7 +79,7 @@
- QuickCheck >= 2.4.0.1,
- random >= 1.0 && < 1.2,
- text >= 0.11.0.5
-- if !os(windows)
-+ if !os(windows) && !(arch(arm) || arch(mips) || arch(ppc) || arch(ppc64) || arch(hppa))
- Build-depends: unix
- CPP-options: -DHAVE_MMAP
- Other-modules: Regress.Mmap
diff -rN -u old-haskell-hashable/patches/fix-mmap.patch new-haskell-hashable/patches/fix-mmap.patch
--- old-haskell-hashable/patches/fix-mmap.patch 1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-hashable/patches/fix-mmap.patch 2015-05-09 20:01:15.332654954 +0000
@@ -0,0 +1,77 @@
+Description: Call mmap through a C helper
+ This fixes problems with the type of the offset argument on some
+ architectures.
+Author: Colin Watson <cjwatson at debian.org>
+Forwarded: no
+Last-Update: 2015-05-09
+
+Index: b/cbits/mmap.c
+===================================================================
+--- /dev/null
++++ b/cbits/mmap.c
+@@ -0,0 +1,40 @@
++/*
++Copyright Colin Watson 2015
++
++All rights reserved.
++
++Redistribution and use in source and binary forms, with or without
++modification, are permitted provided that the following conditions are met:
++
++ * Redistributions of source code must retain the above copyright
++ notice, this list of conditions and the following disclaimer.
++
++ * Redistributions in binary form must reproduce the above
++ copyright notice, this list of conditions and the following
++ disclaimer in the documentation and/or other materials provided
++ with the distribution.
++
++ * Neither the name of Colin Watson nor the names of other
++ contributors may be used to endorse or promote products derived
++ from this software without specific prior written permission.
++
++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
++A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
++OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
++SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
++LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
++OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++*/
++
++#include <sys/mman.h>
++
++void *hashable_mmap(void *addr, size_t length, int prot, int flags,
++ int fd, off_t offset)
++{
++ return mmap(addr, length, prot, flags, fd, offset);
++}
+Index: b/hashable.cabal
+===================================================================
+--- a/hashable.cabal
++++ b/hashable.cabal
+@@ -82,6 +82,7 @@
+ if !os(windows)
+ Build-depends: unix
+ CPP-options: -DHAVE_MMAP
++ C-sources: cbits/mmap.c
+ Other-modules: Regress.Mmap
+
+ Ghc-options: -Wall -fno-warn-orphans
+Index: b/tests/Regress/Mmap.hsc
+===================================================================
+--- a/tests/Regress/Mmap.hsc
++++ b/tests/Regress/Mmap.hsc
+@@ -60,7 +60,7 @@
+ mprotect addr len prot =
+ throwErrnoIfMinus1_ "mprotect" $ c_mprotect addr len prot
+
+-foreign import ccall unsafe "sys/mman.h mmap"
++foreign import ccall unsafe "hashable_mmap"
+ c_mmap :: Ptr a -> CSize -> CInt -> CInt -> CInt -> COff -> IO (Ptr a)
+
+ foreign import ccall unsafe "sys/mman.h munmap"
diff -rN -u old-haskell-hashable/patches/series new-haskell-hashable/patches/series
--- old-haskell-hashable/patches/series 2015-05-09 20:01:15.324654949 +0000
+++ new-haskell-hashable/patches/series 2015-05-09 20:01:15.332654954 +0000
@@ -1 +1 @@
-disable_mmap_on_some_arches
+fix-mmap.patch
More information about the Pkg-haskell-commits
mailing list