[Pkg-haskell-commits] darcs: alex: Add a patch to fux bug #594181.

Erik de Castro Lopo erikd at mega-nerd.com
Sat Oct 30 10:31:22 UTC 2010


Sat Oct 30 10:30:49 UTC 2010  Erik de Castro Lopo <erikd at mega-nerd.com>
  * Add a patch to fux bug #594181.
  Ignore-this: 2b39b5f25d91b592ea2a89648d7b16fa

    M ./changelog +7
    M ./control -2 +2
    A ./patches/
    A ./patches/00-fix-warnings-on-big-endian.diff
    A ./patches/series

Sat Oct 30 10:30:49 UTC 2010  Erik de Castro Lopo <erikd at mega-nerd.com>
  * Add a patch to fux bug #594181.
  Ignore-this: 2b39b5f25d91b592ea2a89648d7b16fa
diff -rN -u old-alex/changelog new-alex/changelog
--- old-alex/changelog	2010-10-30 10:31:22.664104921 +0000
+++ new-alex/changelog	2010-10-30 10:31:22.668105133 +0000
@@ -1,3 +1,10 @@
+alex (2.3.3-2) unstable; urgency=low
+
+  * Fix warnings in alex generated code on big endian systems (Closes: #594181).
+  * debian/control: Bump Standards-Version: to 3.9.1, no changes needed.
+
+ -- Erik de Castro Lopo <erikd at mega-nerd.com>  Sat, 30 Oct 2010 21:16:14 +1100
+
 alex (2.3.3-1) unstable; urgency=low
 
   [ Erik de Castro Lopo ]
diff -rN -u old-alex/control new-alex/control
--- old-alex/control	2010-10-30 10:31:22.664104921 +0000
+++ new-alex/control	2010-10-30 10:31:22.668105133 +0000
@@ -3,8 +3,8 @@
 Priority: extra
 Maintainer: Debian Haskell Group <pkg-haskell-maintainers at lists.alioth.debian.org>
 Uploaders: Joachim Breitner <nomeata at debian.org>
-Standards-Version: 3.8.4
-Build-Depends: cdbs (>= 0.4.59), 
+Standards-Version: 3.9.1
+Build-Depends: cdbs (>= 0.4.59),
                haskell-devscripts (>= 0.7),
                debhelper (>= 7),
                ghc6,
diff -rN -u old-alex/patches/00-fix-warnings-on-big-endian.diff new-alex/patches/00-fix-warnings-on-big-endian.diff
--- old-alex/patches/00-fix-warnings-on-big-endian.diff	1970-01-01 00:00:00.000000000 +0000
+++ new-alex/patches/00-fix-warnings-on-big-endian.diff	2010-10-30 10:31:22.664104921 +0000
@@ -0,0 +1,50 @@
+#Author: Erik de Castro Lopo <erikd at mega-nerd.com>
+#Description :
+# Before this patch alex we generating code that produced warnings when
+# compiled with GHC. This patch was submitted to the alex bug tracker:
+#
+#    http://trac.haskell.org/haskell-platform/ticket/141
+#
+# and the patch has been applied to the alex darcs repo, but there has been
+# no new release yet.
+
+Index: alex-2.3.3/templates/GenericTemplate.hs
+===================================================================
+--- alex-2.3.3.orig/templates/GenericTemplate.hs
++++ alex-2.3.3/templates/GenericTemplate.hs
+@@ -57,10 +57,10 @@
+ ALEX_IF_BIGENDIAN
+   narrow16Int# i
+   where
+-	i    = word2Int# ((high `uncheckedShiftL#` 8#) `or#` low)
+-	high = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))
+-	low  = int2Word# (ord# (indexCharOffAddr# arr off'))
+-	off' = off *# 2#
++	!i    = word2Int# ((high `uncheckedShiftL#` 8#) `or#` low)
++	!high = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))
++	!low  = int2Word# (ord# (indexCharOffAddr# arr off'))
++	!off' = off *# 2#
+ ALEX_ELSE
+   indexInt16OffAddr# arr off
+ ALEX_ENDIF
+@@ -74,14 +74,14 @@
+ ALEX_IF_BIGENDIAN
+   narrow32Int# i
+   where
+-   i    = word2Int# ((b3 `uncheckedShiftL#` 24#) `or#`
++   !i    = word2Int# ((b3 `uncheckedShiftL#` 24#) `or#`
+ 		     (b2 `uncheckedShiftL#` 16#) `or#`
+ 		     (b1 `uncheckedShiftL#` 8#) `or#` b0)
+-   b3   = int2Word# (ord# (indexCharOffAddr# arr (off' +# 3#)))
+-   b2   = int2Word# (ord# (indexCharOffAddr# arr (off' +# 2#)))
+-   b1   = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))
+-   b0   = int2Word# (ord# (indexCharOffAddr# arr off'))
+-   off' = off *# 4#
++   !b3   = int2Word# (ord# (indexCharOffAddr# arr (off' +# 3#)))
++   !b2   = int2Word# (ord# (indexCharOffAddr# arr (off' +# 2#)))
++   !b1   = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))
++   !b0   = int2Word# (ord# (indexCharOffAddr# arr off'))
++   !off' = off *# 4#
+ ALEX_ELSE
+   indexInt32OffAddr# arr off
+ ALEX_ENDIF
diff -rN -u old-alex/patches/series new-alex/patches/series
--- old-alex/patches/series	1970-01-01 00:00:00.000000000 +0000
+++ new-alex/patches/series	2010-10-30 10:31:22.664104921 +0000
@@ -0,0 +1 @@
+00-fix-warnings-on-big-endian.diff





More information about the Pkg-haskell-commits mailing list