diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2017-06-03 23:07:03 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2017-06-03 23:08:47 +0100 |
commit | 7e8590b6f6294628cefcd76f7b946710a1a4a05b (patch) | |
tree | a0a587ca0b3c1fb4c76fdc260f1774c8e8dba19b /dev-haskell | |
parent | dev-java/icedtea-bin: Remove vulnerable 7.2.6.[89] wrt bug #619458 (diff) | |
download | gentoo-7e8590b6f6294628cefcd76f7b946710a1a4a05b.tar.gz gentoo-7e8590b6f6294628cefcd76f7b946710a1a4a05b.tar.bz2 gentoo-7e8590b6f6294628cefcd76f7b946710a1a4a05b.zip |
dev-haskell/bits-atomic: move 30K patch over to DISTDIR, bug #620554
Reported-by: Michał Górny
Bug: https://bugs.gentoo.org/620554
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'dev-haskell')
-rw-r--r-- | dev-haskell/bits-atomic/Manifest | 1 | ||||
-rw-r--r-- | dev-haskell/bits-atomic/bits-atomic-0.1.3-r1.ebuild | 7 | ||||
-rw-r--r-- | dev-haskell/bits-atomic/files/bits-atomic-0.1.3-gcc-5.patch | 610 |
3 files changed, 5 insertions, 613 deletions
diff --git a/dev-haskell/bits-atomic/Manifest b/dev-haskell/bits-atomic/Manifest index 9c9e96e1f9f1..2a704770099e 100644 --- a/dev-haskell/bits-atomic/Manifest +++ b/dev-haskell/bits-atomic/Manifest @@ -1 +1,2 @@ +DIST bits-atomic-0.1.3-gcc-5.patch 30907 SHA256 36fc94f29e45c5df056ffaae6b049f727ffeb6bff3463752f656aeffb027cd89 SHA512 0a40015f225325db3716ac0a17e33eef3f2042b72f933000a52734b103ea3e316a0242a0b75c90a31d0d4c31d33da8d32b07f7c067d79ade51df66ea75a3b19c WHIRLPOOL fe8c13afbfac29d80dc11adb1269bca47f2f241778c8b8ea67516194e90a48059e946d246e0432fdf5cc091a8e8646d9a12e643fd18bc8870523d79b9ed333e1 DIST bits-atomic-0.1.3.tar.gz 7982 SHA256 e0ac3456cf0338e1d5ed33f4c3c6b932d652add2ac827c6a1b6636c6e754cb8d SHA512 e13c21c81ebc6cce2f85a184a572eb1647439f605985a8344ff219cc685c7d0adcf5d2433ea75fa1560a807e329cab23b548435adc0087e6294417eb7a65fbf1 WHIRLPOOL 3c15101610d87f202b910c60f9b875623661872bc91c8ae084e720f94633392b1338df3ee9d8eb3bd104e3c9c0d7dd949ead3a8f28be65e6a9f6458fda620a08 diff --git a/dev-haskell/bits-atomic/bits-atomic-0.1.3-r1.ebuild b/dev-haskell/bits-atomic/bits-atomic-0.1.3-r1.ebuild index e29ee53ddae6..59e62513134b 100644 --- a/dev-haskell/bits-atomic/bits-atomic-0.1.3-r1.ebuild +++ b/dev-haskell/bits-atomic/bits-atomic-0.1.3-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=5 @@ -10,7 +10,8 @@ inherit haskell-cabal DESCRIPTION="Atomic bit operations on memory locations for low-level synchronization" HOMEPAGE="http://hackage.haskell.org/package/bits-atomic" -SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz" +SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz + https://dev.gentoo.org/~slyfox/patches/${P}-gcc-5.patch" LICENSE="BSD" SLOT="0/${PV}" @@ -29,6 +30,6 @@ DEPEND="${RDEPEND} " src_prepare() { - epatch "${FILESDIR}"/${P}-gcc-5.patch + epatch "${DISTDIR}"/${P}-gcc-5.patch epatch "${FILESDIR}"/${P}-ghc-8.patch } diff --git a/dev-haskell/bits-atomic/files/bits-atomic-0.1.3-gcc-5.patch b/dev-haskell/bits-atomic/files/bits-atomic-0.1.3-gcc-5.patch deleted file mode 100644 index a500862f6184..000000000000 --- a/dev-haskell/bits-atomic/files/bits-atomic-0.1.3-gcc-5.patch +++ /dev/null @@ -1,610 +0,0 @@ -diff --git a/Setup.hs b/Setup.hs -index 46f5022..36c3aa9 100644 ---- a/Setup.hs -+++ b/Setup.hs -@@ -1,19 +1,7 @@ --{-# LANGUAGE CPP #-} --import Distribution.Simple --import Distribution.PackageDescription --import Distribution.Simple.LocalBuildInfo(LocalBuildInfo, buildDir) --import System.Cmd(system) -- --ps :: String --#if mingw32_HOST_OS || mingw32_TARGET_OS --ps = ['\\'] --#else --ps = ['/'] --#endif -+#!/usr/bin/runhaskell -+module Main where - --main = defaultMainWithHooks hooks -- where hooks = simpleUserHooks { runTests = runTests' } -+import Distribution.Simple - --runTests' :: Args -> Bool -> PackageDescription -> LocalBuildInfo -> IO () --runTests' _ _ _ lbi = system testprog >> return () -- where testprog = (buildDir lbi) ++ ps ++ "test" ++ ps ++ "test" -+main :: IO () -+main = defaultMain -diff --git a/bits-atomic.cabal b/bits-atomic.cabal -index 68da7f7..97b513f 100644 ---- a/bits-atomic.cabal -+++ b/bits-atomic.cabal -@@ -43,3 +43,3 @@ Stability: experimental - Build-Type: Custom --Cabal-Version: >= 1.6 -+Cabal-Version: >= 1.8 - Extra-Source-Files: cbits/atomic-bitops-gcc.c cbits/atomic-bitops-gcc.h -@@ -64,11 +64,6 @@ library - --flag test -- description: Build test program. -- default: False -- --Executable test -- if flag(test) -- buildable: True -- build-depends: -- base >= 4 && < 6, -+test-suite test -+ Type: exitcode-stdio-1.0 -+ build-depends: bits-atomic, -+ base >= 4 && < 6, - QuickCheck, -@@ -78,6 +73,4 @@ Executable test - test-framework -- else -- buildable: False -- hs-source-dirs: ., test -- other-modules: Data.Bits.Atomic -+ -+ hs-source-dirs: test - main-is: test.hs -@@ -85,4 +78 @@ Executable test - GHC-Prof-Options: -auto-all -- -- Include-Dirs: cbits -- C-Sources: cbits/atomic-bitops-gcc.c -diff --git a/cbits/atomic-bitops-gcc.c b/cbits/atomic-bitops-gcc.c -index 3f9d4ef..96ed076 100644 ---- a/cbits/atomic-bitops-gcc.c -+++ b/cbits/atomic-bitops-gcc.c -@@ -5,39 +5,39 @@ void mem_barrier (void) {return __sync_synchronize ();} - /* 8-bit */ --inline unsigned char fetch_and_add_8 (unsigned char *p, unsigned char v) { -+unsigned char fetch_and_add_8 (unsigned char *p, unsigned char v) { - return __sync_fetch_and_add (p, v); - } --inline unsigned char fetch_and_sub_8 (unsigned char *p, unsigned char v) { -+unsigned char fetch_and_sub_8 (unsigned char *p, unsigned char v) { - return __sync_fetch_and_sub (p, v); - } --inline unsigned char fetch_and_or_8 (unsigned char *p, unsigned char v) { -+unsigned char fetch_and_or_8 (unsigned char *p, unsigned char v) { - return __sync_fetch_and_or (p, v); - } --inline unsigned char fetch_and_and_8 (unsigned char *p, unsigned char v) { -+unsigned char fetch_and_and_8 (unsigned char *p, unsigned char v) { - return __sync_fetch_and_and (p, v); - } --inline unsigned char fetch_and_xor_8 (unsigned char *p, unsigned char v) { -+unsigned char fetch_and_xor_8 (unsigned char *p, unsigned char v) { - return __sync_fetch_and_xor (p, v); - } --inline unsigned char fetch_and_nand_8 (unsigned char *p, unsigned char v) { -+unsigned char fetch_and_nand_8 (unsigned char *p, unsigned char v) { - return __sync_fetch_and_nand (p, v); - } --inline unsigned char add_and_fetch_8 (unsigned char *p, unsigned char v) { -+unsigned char add_and_fetch_8 (unsigned char *p, unsigned char v) { - return __sync_add_and_fetch (p, v); - } --inline unsigned char sub_and_fetch_8 (unsigned char *p, unsigned char v) { -+unsigned char sub_and_fetch_8 (unsigned char *p, unsigned char v) { - return __sync_sub_and_fetch (p, v); - } --inline unsigned char or_and_fetch_8 (unsigned char *p, unsigned char v) { -+unsigned char or_and_fetch_8 (unsigned char *p, unsigned char v) { - return __sync_or_and_fetch (p, v); - } --inline unsigned char and_and_fetch_8 (unsigned char *p, unsigned char v) { -+unsigned char and_and_fetch_8 (unsigned char *p, unsigned char v) { - return __sync_and_and_fetch (p, v); - } --inline unsigned char xor_and_fetch_8 (unsigned char *p, unsigned char v) { -+unsigned char xor_and_fetch_8 (unsigned char *p, unsigned char v) { - return __sync_xor_and_fetch (p, v); - } --inline unsigned char nand_and_fetch_8 (unsigned char *p, unsigned char v) { -+unsigned char nand_and_fetch_8 (unsigned char *p, unsigned char v) { - return __sync_nand_and_fetch (p, v); - } --inline unsigned int -+unsigned int - bool_compare_and_swap_8 (unsigned char *p, unsigned char old, unsigned char new) { -@@ -45,3 +45,3 @@ bool_compare_and_swap_8 (unsigned char *p, unsigned char old, unsigned char new) - } --inline unsigned char -+unsigned char - val_compare_and_swap_8 (unsigned char *p, unsigned char old, unsigned char new) { -@@ -49,3 +49,3 @@ val_compare_and_swap_8 (unsigned char *p, unsigned char old, unsigned char new) - } --inline unsigned char lock_test_and_set_8 (unsigned char *p) { -+unsigned char lock_test_and_set_8 (unsigned char *p) { - // Only immediate 0/1 appear to be widely supported, so hardcode it -@@ -60,39 +60,39 @@ void lock_release_8 (unsigned char *p) { - /* 16-bit */ --inline unsigned short fetch_and_add_16 (unsigned short *p, unsigned short v) { -+unsigned short fetch_and_add_16 (unsigned short *p, unsigned short v) { - return __sync_fetch_and_add (p, v); - } --inline unsigned short fetch_and_sub_16 (unsigned short *p, unsigned short v) { -+unsigned short fetch_and_sub_16 (unsigned short *p, unsigned short v) { - return __sync_fetch_and_sub (p, v); - } --inline unsigned short fetch_and_or_16 (unsigned short *p, unsigned short v) { -+unsigned short fetch_and_or_16 (unsigned short *p, unsigned short v) { - return __sync_fetch_and_or (p, v); - } --inline unsigned short fetch_and_and_16 (unsigned short *p, unsigned short v) { -+unsigned short fetch_and_and_16 (unsigned short *p, unsigned short v) { - return __sync_fetch_and_and (p, v); - } --inline unsigned short fetch_and_xor_16 (unsigned short *p, unsigned short v) { -+unsigned short fetch_and_xor_16 (unsigned short *p, unsigned short v) { - return __sync_fetch_and_xor (p, v); - } --inline unsigned short fetch_and_nand_16 (unsigned short *p, unsigned short v) { -+unsigned short fetch_and_nand_16 (unsigned short *p, unsigned short v) { - return __sync_fetch_and_nand (p, v); - } --inline unsigned short add_and_fetch_16 (unsigned short *p, unsigned short v) { -+unsigned short add_and_fetch_16 (unsigned short *p, unsigned short v) { - return __sync_add_and_fetch (p, v); - } --inline unsigned short sub_and_fetch_16 (unsigned short *p, unsigned short v) { -+unsigned short sub_and_fetch_16 (unsigned short *p, unsigned short v) { - return __sync_sub_and_fetch (p, v); - } --inline unsigned short or_and_fetch_16 (unsigned short *p, unsigned short v) { -+unsigned short or_and_fetch_16 (unsigned short *p, unsigned short v) { - return __sync_or_and_fetch (p, v); - } --inline unsigned short and_and_fetch_16 (unsigned short *p, unsigned short v) { -+unsigned short and_and_fetch_16 (unsigned short *p, unsigned short v) { - return __sync_and_and_fetch (p, v); - } --inline unsigned short xor_and_fetch_16 (unsigned short *p, unsigned short v) { -+unsigned short xor_and_fetch_16 (unsigned short *p, unsigned short v) { - return __sync_xor_and_fetch (p, v); - } --inline unsigned short nand_and_fetch_16 (unsigned short *p, unsigned short v) { -+unsigned short nand_and_fetch_16 (unsigned short *p, unsigned short v) { - return __sync_nand_and_fetch (p, v); - } --inline unsigned int -+unsigned int - bool_compare_and_swap_16 (unsigned short *p, unsigned short old, unsigned short new) { -@@ -100,3 +100,3 @@ bool_compare_and_swap_16 (unsigned short *p, unsigned short old, unsigned short - } --inline unsigned short -+unsigned short - val_compare_and_swap_16 (unsigned short *p, unsigned short old, unsigned short new) { -@@ -104,3 +104,3 @@ val_compare_and_swap_16 (unsigned short *p, unsigned short old, unsigned short n - } --inline unsigned short lock_test_and_set_16 (unsigned short *p) { -+unsigned short lock_test_and_set_16 (unsigned short *p) { - // Only immediate 0/1 appear to be widely supported, so hardcode it -@@ -115,39 +115,39 @@ void lock_release_16 (unsigned short *p) { - /* 32-bit */ --inline unsigned int fetch_and_add_32 (unsigned int *p, unsigned int v) { -+unsigned int fetch_and_add_32 (unsigned int *p, unsigned int v) { - return __sync_fetch_and_add (p, v); - } --inline unsigned int fetch_and_sub_32 (unsigned int *p, unsigned int v) { -+unsigned int fetch_and_sub_32 (unsigned int *p, unsigned int v) { - return __sync_fetch_and_sub (p, v); - } --inline unsigned int fetch_and_or_32 (unsigned int *p, unsigned int v) { -+unsigned int fetch_and_or_32 (unsigned int *p, unsigned int v) { - return __sync_fetch_and_or (p, v); - } --inline unsigned int fetch_and_and_32 (unsigned int *p, unsigned int v) { -+unsigned int fetch_and_and_32 (unsigned int *p, unsigned int v) { - return __sync_fetch_and_and (p, v); - } --inline unsigned int fetch_and_xor_32 (unsigned int *p, unsigned int v) { -+unsigned int fetch_and_xor_32 (unsigned int *p, unsigned int v) { - return __sync_fetch_and_xor (p, v); - } --inline unsigned int fetch_and_nand_32 (unsigned int *p, unsigned int v) { -+unsigned int fetch_and_nand_32 (unsigned int *p, unsigned int v) { - return __sync_fetch_and_nand (p, v); - } --inline unsigned int add_and_fetch_32 (unsigned int *p, unsigned int v) { -+unsigned int add_and_fetch_32 (unsigned int *p, unsigned int v) { - return __sync_add_and_fetch (p, v); - } --inline unsigned int sub_and_fetch_32 (unsigned int *p, unsigned int v) { -+unsigned int sub_and_fetch_32 (unsigned int *p, unsigned int v) { - return __sync_sub_and_fetch (p, v); - } --inline unsigned int or_and_fetch_32 (unsigned int *p, unsigned int v) { -+unsigned int or_and_fetch_32 (unsigned int *p, unsigned int v) { - return __sync_or_and_fetch (p, v); - } --inline unsigned int and_and_fetch_32 (unsigned int *p, unsigned int v) { -+unsigned int and_and_fetch_32 (unsigned int *p, unsigned int v) { - return __sync_and_and_fetch (p, v); - } --inline unsigned int xor_and_fetch_32 (unsigned int *p, unsigned int v) { -+unsigned int xor_and_fetch_32 (unsigned int *p, unsigned int v) { - return __sync_xor_and_fetch (p, v); - } --inline unsigned int nand_and_fetch_32 (unsigned int *p, unsigned int v) { -+unsigned int nand_and_fetch_32 (unsigned int *p, unsigned int v) { - return __sync_nand_and_fetch (p, v); - } --inline unsigned int -+unsigned int - bool_compare_and_swap_32 (unsigned int *p, unsigned int old, unsigned int new) { -@@ -155,3 +155,3 @@ bool_compare_and_swap_32 (unsigned int *p, unsigned int old, unsigned int new) { - } --inline unsigned int -+unsigned int - val_compare_and_swap_32 (unsigned int *p, unsigned int old, unsigned int new) { -@@ -159,3 +159,3 @@ val_compare_and_swap_32 (unsigned int *p, unsigned int old, unsigned int new) { - } --inline unsigned int lock_test_and_set_32 (unsigned int *p) { -+unsigned int lock_test_and_set_32 (unsigned int *p) { - // Only immediate 0/1 appear to be widely supported, so hardcode it -@@ -170,39 +170,39 @@ void lock_release_32 (unsigned int *p) { - /* 64-bit */ --inline unsigned long long fetch_and_add_64 (unsigned long long *p, unsigned long long v) { -+unsigned long long fetch_and_add_64 (unsigned long long *p, unsigned long long v) { - return __sync_fetch_and_add (p, v); - } --inline unsigned long long fetch_and_sub_64 (unsigned long long *p, unsigned long long v) { -+unsigned long long fetch_and_sub_64 (unsigned long long *p, unsigned long long v) { - return __sync_fetch_and_sub (p, v); - } --inline unsigned long long fetch_and_or_64 (unsigned long long *p, unsigned long long v) { -+unsigned long long fetch_and_or_64 (unsigned long long *p, unsigned long long v) { - return __sync_fetch_and_or (p, v); - } --inline unsigned long long fetch_and_and_64 (unsigned long long *p, unsigned long long v) { -+unsigned long long fetch_and_and_64 (unsigned long long *p, unsigned long long v) { - return __sync_fetch_and_and (p, v); - } --inline unsigned long long fetch_and_xor_64 (unsigned long long *p, unsigned long long v) { -+unsigned long long fetch_and_xor_64 (unsigned long long *p, unsigned long long v) { - return __sync_fetch_and_xor (p, v); - } --inline unsigned long long fetch_and_nand_64 (unsigned long long *p, unsigned long long v) { -+unsigned long long fetch_and_nand_64 (unsigned long long *p, unsigned long long v) { - return __sync_fetch_and_nand (p, v); - } --inline unsigned long long add_and_fetch_64 (unsigned long long *p, unsigned long long v) { -+unsigned long long add_and_fetch_64 (unsigned long long *p, unsigned long long v) { - return __sync_add_and_fetch (p, v); - } --inline unsigned long long sub_and_fetch_64 (unsigned long long *p, unsigned long long v) { -+unsigned long long sub_and_fetch_64 (unsigned long long *p, unsigned long long v) { - return __sync_sub_and_fetch (p, v); - } --inline unsigned long long or_and_fetch_64 (unsigned long long *p, unsigned long long v) { -+unsigned long long or_and_fetch_64 (unsigned long long *p, unsigned long long v) { - return __sync_or_and_fetch (p, v); - } --inline unsigned long long and_and_fetch_64 (unsigned long long *p, unsigned long long v) { -+unsigned long long and_and_fetch_64 (unsigned long long *p, unsigned long long v) { - return __sync_and_and_fetch (p, v); - } --inline unsigned long long xor_and_fetch_64 (unsigned long long *p, unsigned long long v) { -+unsigned long long xor_and_fetch_64 (unsigned long long *p, unsigned long long v) { - return __sync_xor_and_fetch (p, v); - } --inline unsigned long long nand_and_fetch_64 (unsigned long long *p, unsigned long long v) { -+unsigned long long nand_and_fetch_64 (unsigned long long *p, unsigned long long v) { - return __sync_nand_and_fetch (p, v); - } --inline unsigned int -+unsigned int - bool_compare_and_swap_64 (unsigned long long *p, unsigned long long old, unsigned long long new) { -@@ -210,3 +210,3 @@ bool_compare_and_swap_64 (unsigned long long *p, unsigned long long old, unsigne - } --inline unsigned long long -+unsigned long long - val_compare_and_swap_64 (unsigned long long *p, unsigned long long old, unsigned long long new) { -@@ -214,3 +214,3 @@ val_compare_and_swap_64 (unsigned long long *p, unsigned long long old, unsigned - } --inline unsigned long long lock_test_and_set_64 (unsigned long long *p) { -+unsigned long long lock_test_and_set_64 (unsigned long long *p) { - // Only immediate 0/1 appear to be widely supported, so hardcode it -@@ -225,39 +225,39 @@ void lock_release_64 (unsigned long long *p) { - /* Word-sized */ --inline unsigned long fetch_and_add_word (unsigned long *p, unsigned long v) { -+unsigned long fetch_and_add_word (unsigned long *p, unsigned long v) { - return __sync_fetch_and_add (p, v); - } --inline unsigned long fetch_and_sub_word (unsigned long *p, unsigned long v) { -+unsigned long fetch_and_sub_word (unsigned long *p, unsigned long v) { - return __sync_fetch_and_sub (p, v); - } --inline unsigned long fetch_and_or_word (unsigned long *p, unsigned long v) { -+unsigned long fetch_and_or_word (unsigned long *p, unsigned long v) { - return __sync_fetch_and_or (p, v); - } --inline unsigned long fetch_and_and_word (unsigned long *p, unsigned long v) { -+unsigned long fetch_and_and_word (unsigned long *p, unsigned long v) { - return __sync_fetch_and_and (p, v); - } --inline unsigned long fetch_and_xor_word (unsigned long *p, unsigned long v) { -+unsigned long fetch_and_xor_word (unsigned long *p, unsigned long v) { - return __sync_fetch_and_xor (p, v); - } --inline unsigned long fetch_and_nand_word (unsigned long *p, unsigned long v) { -+unsigned long fetch_and_nand_word (unsigned long *p, unsigned long v) { - return __sync_fetch_and_nand (p, v); - } --inline unsigned long add_and_fetch_word (unsigned long *p, unsigned long v) { -+unsigned long add_and_fetch_word (unsigned long *p, unsigned long v) { - return __sync_add_and_fetch (p, v); - } --inline unsigned long sub_and_fetch_word (unsigned long *p, unsigned long v) { -+unsigned long sub_and_fetch_word (unsigned long *p, unsigned long v) { - return __sync_sub_and_fetch (p, v); - } --inline unsigned long or_and_fetch_word (unsigned long *p, unsigned long v) { -+unsigned long or_and_fetch_word (unsigned long *p, unsigned long v) { - return __sync_or_and_fetch (p, v); - } --inline unsigned long and_and_fetch_word (unsigned long *p, unsigned long v) { -+unsigned long and_and_fetch_word (unsigned long *p, unsigned long v) { - return __sync_and_and_fetch (p, v); - } --inline unsigned long xor_and_fetch_word (unsigned long *p, unsigned long v) { -+unsigned long xor_and_fetch_word (unsigned long *p, unsigned long v) { - return __sync_xor_and_fetch (p, v); - } --inline unsigned long nand_and_fetch_word (unsigned long *p, unsigned long v) { -+unsigned long nand_and_fetch_word (unsigned long *p, unsigned long v) { - return __sync_nand_and_fetch (p, v); - } --inline unsigned int -+unsigned int - bool_compare_and_swap_word (unsigned long *p, unsigned long old, unsigned long new) { -@@ -265,3 +265,3 @@ bool_compare_and_swap_word (unsigned long *p, unsigned long old, unsigned long n - } --inline unsigned long -+unsigned long - val_compare_and_swap_word (unsigned long *p, unsigned long old, unsigned long new) { -@@ -269,3 +269,3 @@ val_compare_and_swap_word (unsigned long *p, unsigned long old, unsigned long ne - } --inline unsigned long lock_test_and_set_word (unsigned long *p) { -+unsigned long lock_test_and_set_word (unsigned long *p) { - // Only immediate 0/1 appear to be widely supported, so hardcode it -diff --git a/cbits/atomic-bitops-gcc.h b/cbits/atomic-bitops-gcc.h -index f9eccc4..7e0ef15 100644 ---- a/cbits/atomic-bitops-gcc.h -+++ b/cbits/atomic-bitops-gcc.h -@@ -6,19 +6,19 @@ void mem_barrier (void); - /* 8-bit */ --inline unsigned char fetch_and_add_8 (unsigned char *, unsigned char ); --inline unsigned char fetch_and_sub_8 (unsigned char *, unsigned char ); --inline unsigned char fetch_and_or_8 (unsigned char *, unsigned char ); --inline unsigned char fetch_and_and_8 (unsigned char *, unsigned char ); --inline unsigned char fetch_and_xor_8 (unsigned char *, unsigned char ); --inline unsigned char fetch_and_nand_8 (unsigned char *, unsigned char ); --inline unsigned char add_and_fetch_8 (unsigned char *, unsigned char ); --inline unsigned char sub_and_fetch_8 (unsigned char *, unsigned char ); --inline unsigned char or_and_fetch_8 (unsigned char *, unsigned char ); --inline unsigned char and_and_fetch_8 (unsigned char *, unsigned char ); --inline unsigned char xor_and_fetch_8 (unsigned char *, unsigned char ); --inline unsigned char nand_and_fetch_8 (unsigned char *, unsigned char ); --inline unsigned int -+unsigned char fetch_and_add_8 (unsigned char *, unsigned char ); -+unsigned char fetch_and_sub_8 (unsigned char *, unsigned char ); -+unsigned char fetch_and_or_8 (unsigned char *, unsigned char ); -+unsigned char fetch_and_and_8 (unsigned char *, unsigned char ); -+unsigned char fetch_and_xor_8 (unsigned char *, unsigned char ); -+unsigned char fetch_and_nand_8 (unsigned char *, unsigned char ); -+unsigned char add_and_fetch_8 (unsigned char *, unsigned char ); -+unsigned char sub_and_fetch_8 (unsigned char *, unsigned char ); -+unsigned char or_and_fetch_8 (unsigned char *, unsigned char ); -+unsigned char and_and_fetch_8 (unsigned char *, unsigned char ); -+unsigned char xor_and_fetch_8 (unsigned char *, unsigned char ); -+unsigned char nand_and_fetch_8 (unsigned char *, unsigned char ); -+unsigned int - bool_compare_and_swap_8 (unsigned char *, unsigned char, unsigned char); --inline unsigned char -+unsigned char - val_compare_and_swap_8 (unsigned char *, unsigned char , unsigned char); --inline unsigned char lock_test_and_set_8 (unsigned char *); -+unsigned char lock_test_and_set_8 (unsigned char *); - void lock_release_8 (unsigned char *); -@@ -26,19 +26,19 @@ void lock_release_8 (unsigned char *); - /* 16-bit */ --inline unsigned short fetch_and_add_16 (unsigned short *, unsigned short ); --inline unsigned short fetch_and_sub_16 (unsigned short *, unsigned short ); --inline unsigned short fetch_and_or_16 (unsigned short *, unsigned short ); --inline unsigned short fetch_and_and_16 (unsigned short *, unsigned short ); --inline unsigned short fetch_and_xor_16 (unsigned short *, unsigned short ); --inline unsigned short fetch_and_nand_16 (unsigned short *, unsigned short ); --inline unsigned short add_and_fetch_16 (unsigned short *, unsigned short ); --inline unsigned short sub_and_fetch_16 (unsigned short *, unsigned short ); --inline unsigned short or_and_fetch_16 (unsigned short *, unsigned short ); --inline unsigned short and_and_fetch_16 (unsigned short *, unsigned short ); --inline unsigned short xor_and_fetch_16 (unsigned short *, unsigned short ); --inline unsigned short nand_and_fetch_16 (unsigned short *, unsigned short ); --inline unsigned int -+unsigned short fetch_and_add_16 (unsigned short *, unsigned short ); -+unsigned short fetch_and_sub_16 (unsigned short *, unsigned short ); -+unsigned short fetch_and_or_16 (unsigned short *, unsigned short ); -+unsigned short fetch_and_and_16 (unsigned short *, unsigned short ); -+unsigned short fetch_and_xor_16 (unsigned short *, unsigned short ); -+unsigned short fetch_and_nand_16 (unsigned short *, unsigned short ); -+unsigned short add_and_fetch_16 (unsigned short *, unsigned short ); -+unsigned short sub_and_fetch_16 (unsigned short *, unsigned short ); -+unsigned short or_and_fetch_16 (unsigned short *, unsigned short ); -+unsigned short and_and_fetch_16 (unsigned short *, unsigned short ); -+unsigned short xor_and_fetch_16 (unsigned short *, unsigned short ); -+unsigned short nand_and_fetch_16 (unsigned short *, unsigned short ); -+unsigned int - bool_compare_and_swap_16 (unsigned short *, unsigned short , unsigned short ); --inline unsigned short -+unsigned short - val_compare_and_swap_16 (unsigned short *, unsigned short , unsigned short ); --inline unsigned short lock_test_and_set_16 (unsigned short *); -+unsigned short lock_test_and_set_16 (unsigned short *); - void lock_release_16 (unsigned short *); -@@ -47,19 +47,19 @@ void lock_release_16 (unsigned short *); - /* 32-bit */ --inline unsigned int fetch_and_add_32 (unsigned int *, unsigned int ); --inline unsigned int fetch_and_sub_32 (unsigned int *, unsigned int ); --inline unsigned int fetch_and_or_32 (unsigned int *, unsigned int ); --inline unsigned int fetch_and_and_32 (unsigned int *, unsigned int ); --inline unsigned int fetch_and_xor_32 (unsigned int *, unsigned int ); --inline unsigned int fetch_and_nand_32 (unsigned int *, unsigned int ); --inline unsigned int add_and_fetch_32 (unsigned int *, unsigned int ); --inline unsigned int sub_and_fetch_32 (unsigned int *, unsigned int ); --inline unsigned int or_and_fetch_32 (unsigned int *, unsigned int ); --inline unsigned int and_and_fetch_32 (unsigned int *, unsigned int ); --inline unsigned int xor_and_fetch_32 (unsigned int *, unsigned int ); --inline unsigned int nand_and_fetch_32 (unsigned int *, unsigned int ); --inline unsigned int -+unsigned int fetch_and_add_32 (unsigned int *, unsigned int ); -+unsigned int fetch_and_sub_32 (unsigned int *, unsigned int ); -+unsigned int fetch_and_or_32 (unsigned int *, unsigned int ); -+unsigned int fetch_and_and_32 (unsigned int *, unsigned int ); -+unsigned int fetch_and_xor_32 (unsigned int *, unsigned int ); -+unsigned int fetch_and_nand_32 (unsigned int *, unsigned int ); -+unsigned int add_and_fetch_32 (unsigned int *, unsigned int ); -+unsigned int sub_and_fetch_32 (unsigned int *, unsigned int ); -+unsigned int or_and_fetch_32 (unsigned int *, unsigned int ); -+unsigned int and_and_fetch_32 (unsigned int *, unsigned int ); -+unsigned int xor_and_fetch_32 (unsigned int *, unsigned int ); -+unsigned int nand_and_fetch_32 (unsigned int *, unsigned int ); -+unsigned int - bool_compare_and_swap_32 (unsigned int *, unsigned int , unsigned int ); --inline unsigned int -+unsigned int - val_compare_and_swap_32 (unsigned int *, unsigned int , unsigned int ); --inline unsigned int lock_test_and_set_32 (unsigned int *); -+unsigned int lock_test_and_set_32 (unsigned int *); - void lock_release_32 (unsigned int *); -@@ -67,19 +67,19 @@ void lock_release_32 (unsigned int *); - /* 64-bit */ --inline unsigned long long fetch_and_add_64 (unsigned long long *, unsigned long long ); --inline unsigned long long fetch_and_sub_64 (unsigned long long *, unsigned long long ); --inline unsigned long long fetch_and_or_64 (unsigned long long *, unsigned long long ); --inline unsigned long long fetch_and_and_64 (unsigned long long *, unsigned long long ); --inline unsigned long long fetch_and_xor_64 (unsigned long long *, unsigned long long ); --inline unsigned long long fetch_and_nand_64 (unsigned long long *, unsigned long long ); --inline unsigned long long add_and_fetch_64 (unsigned long long *, unsigned long long ); --inline unsigned long long sub_and_fetch_64 (unsigned long long *, unsigned long long ); --inline unsigned long long or_and_fetch_64 (unsigned long long *, unsigned long long ); --inline unsigned long long and_and_fetch_64 (unsigned long long *, unsigned long long ); --inline unsigned long long xor_and_fetch_64 (unsigned long long *, unsigned long long ); --inline unsigned long long nand_and_fetch_64 (unsigned long long *, unsigned long long ); --inline unsigned int -+unsigned long long fetch_and_add_64 (unsigned long long *, unsigned long long ); -+unsigned long long fetch_and_sub_64 (unsigned long long *, unsigned long long ); -+unsigned long long fetch_and_or_64 (unsigned long long *, unsigned long long ); -+unsigned long long fetch_and_and_64 (unsigned long long *, unsigned long long ); -+unsigned long long fetch_and_xor_64 (unsigned long long *, unsigned long long ); -+unsigned long long fetch_and_nand_64 (unsigned long long *, unsigned long long ); -+unsigned long long add_and_fetch_64 (unsigned long long *, unsigned long long ); -+unsigned long long sub_and_fetch_64 (unsigned long long *, unsigned long long ); -+unsigned long long or_and_fetch_64 (unsigned long long *, unsigned long long ); -+unsigned long long and_and_fetch_64 (unsigned long long *, unsigned long long ); -+unsigned long long xor_and_fetch_64 (unsigned long long *, unsigned long long ); -+unsigned long long nand_and_fetch_64 (unsigned long long *, unsigned long long ); -+unsigned int - bool_compare_and_swap_64 (unsigned long long *, unsigned long long , unsigned long long ); --inline unsigned long long -+unsigned long long - val_compare_and_swap_64 (unsigned long long *, unsigned long long , unsigned long long ); --inline unsigned long long lock_test_and_set_64 (unsigned long long *); -+unsigned long long lock_test_and_set_64 (unsigned long long *); - void lock_release_64 (unsigned long long *); -@@ -87,19 +87,19 @@ void lock_release_64 (unsigned long long *); - /* Word */ --inline unsigned long fetch_and_add_word (unsigned long *, unsigned long ); --inline unsigned long fetch_and_sub_word (unsigned long *, unsigned long ); --inline unsigned long fetch_and_or_word (unsigned long *, unsigned long ); --inline unsigned long fetch_and_and_word (unsigned long *, unsigned long ); --inline unsigned long fetch_and_xor_word (unsigned long *, unsigned long ); --inline unsigned long fetch_and_nand_word (unsigned long *, unsigned long ); --inline unsigned long add_and_fetch_word (unsigned long *, unsigned long ); --inline unsigned long sub_and_fetch_word (unsigned long *, unsigned long ); --inline unsigned long or_and_fetch_word (unsigned long *, unsigned long ); --inline unsigned long and_and_fetch_word (unsigned long *, unsigned long ); --inline unsigned long xor_and_fetch_word (unsigned long *, unsigned long ); --inline unsigned long nand_and_fetch_word (unsigned long *, unsigned long ); --inline unsigned int -+unsigned long fetch_and_add_word (unsigned long *, unsigned long ); -+unsigned long fetch_and_sub_word (unsigned long *, unsigned long ); -+unsigned long fetch_and_or_word (unsigned long *, unsigned long ); -+unsigned long fetch_and_and_word (unsigned long *, unsigned long ); -+unsigned long fetch_and_xor_word (unsigned long *, unsigned long ); -+unsigned long fetch_and_nand_word (unsigned long *, unsigned long ); -+unsigned long add_and_fetch_word (unsigned long *, unsigned long ); -+unsigned long sub_and_fetch_word (unsigned long *, unsigned long ); -+unsigned long or_and_fetch_word (unsigned long *, unsigned long ); -+unsigned long and_and_fetch_word (unsigned long *, unsigned long ); -+unsigned long xor_and_fetch_word (unsigned long *, unsigned long ); -+unsigned long nand_and_fetch_word (unsigned long *, unsigned long ); -+unsigned int - bool_compare_and_swap_word (unsigned long *, unsigned long , unsigned long ); --inline unsigned long -+unsigned long - val_compare_and_swap_word (unsigned long *, unsigned long , unsigned long ); --inline unsigned long lock_test_and_set_word (unsigned long *); -+unsigned long lock_test_and_set_word (unsigned long *); - void lock_release_word (unsigned long *); -diff --git a/test/test.hs b/test/test.hs -index 8cf3cb2..38238b5 100644 ---- a/test/test.hs -+++ b/test/test.hs -@@ -35,3 +35,3 @@ testPattern = 0xdeadbeef - --type PolyTest = (AtomicBits a, Storable a, Integral a, Bounded a) => a -> Assertion -+type PolyTest = (AtomicBits a, Storable a, Integral a, Bounded a, Show a) => a -> Assertion - -@@ -50,3 +50,3 @@ testTypes _test = do - --test_compareAndSwap :: (AtomicBits a, Storable a, Integral a, Bounded a) => -+test_compareAndSwap :: (AtomicBits a, Storable a, Integral a, Bounded a, Show a) => - a -> Assertion -@@ -65,3 +65,3 @@ test_compareAndSwap_all = testTypes test_compareAndSwap - --test_compareAndSwapBool :: (AtomicBits a, Storable a, Integral a, Bounded a) => -+test_compareAndSwapBool :: (AtomicBits a, Storable a, Integral a, Bounded a, Show a) => - a -> Assertion -@@ -80,3 +80,3 @@ test_compareAndSwapBool_all = testTypes test_compareAndSwapBool - --test_fetchAndAdd :: (AtomicBits a, Storable a, Integral a, Bounded a) => -+test_fetchAndAdd :: (AtomicBits a, Storable a, Integral a, Bounded a, Show a) => - a -> Assertion -@@ -98,3 +98,3 @@ test_fetchAndAdd_all = testTypes test_fetchAndAdd - --test_fetchAndSub :: (AtomicBits a, Storable a, Integral a, Bounded a) => -+test_fetchAndSub :: (AtomicBits a, Storable a, Integral a, Bounded a, Show a) => - a -> Assertion -@@ -115,3 +115,3 @@ test_fetchAndSub_all = testTypes test_fetchAndSub - --test_fetchAndXor :: (AtomicBits a, Storable a, Integral a, Bounded a) => -+test_fetchAndXor :: (AtomicBits a, Storable a, Integral a, Bounded a, Show a) => - a -> Assertion -@@ -127,3 +127,3 @@ test_fetchAndXor_all = testTypes test_fetchAndXor - --test_subAndFetch :: (AtomicBits a, Storable a, Integral a, Bounded a) => -+test_subAndFetch :: (AtomicBits a, Storable a, Integral a, Bounded a, Show a) => - a -> Assertion -@@ -140,3 +140,3 @@ test_subAndFetch_all = testTypes test_subAndFetch - --test_lockTestRelease :: (AtomicBits a, Storable a, Integral a, Bounded a) => -+test_lockTestRelease :: (AtomicBits a, Storable a, Integral a, Bounded a, Show a) => - a -> Assertion |