usb 1.3.0.4 → 1.3.0.5
raw patch · 15 files changed
+41/−67 lines, 15 filesdep ~basedep ~vectorsetup-changed
Dependency ranges changed: base, vector
Files
- Changelog +12/−3
- LICENSE +1/−1
- Setup.hs +2/−43
- System/USB.hs +1/−1
- System/USB/Base.hs +2/−2
- System/USB/Descriptors.hs +1/−1
- System/USB/DeviceHandling.hs +1/−1
- System/USB/Enumeration.hs +1/−1
- System/USB/Exceptions.hs +1/−1
- System/USB/IO.hs +2/−2
- System/USB/IO/StandardDeviceRequests.hs +2/−2
- System/USB/IO/Transfers.hs +2/−2
- System/USB/Initialization.hs +1/−1
- System/USB/Misc.hs +1/−1
- usb.cabal +11/−5
Changelog view
@@ -1,16 +1,25 @@-1.3.0.4+1.3.0.5 (2017-07-07) + * Fix segfault in registerHotplugCallback caused by a double-free.+ The fix was to increment the reference count of the USB device that+ was passed to the HotplugCallback.++ Thanks to Ryan Mulligan and Ian Kane for reporting and investigating this bug.+++1.3.0.4 (2016-07-02)+ * Support GHC-8.0.1. * Support vector-0.11. * Add Travis-CI integration. -1.3.0.3+1.3.0.3 (2015-05-06) * Fix incorrect direction in controlRead. -1.3.0.2+1.3.0.2 (2015-05-02) * Support GHC-7.10.2.
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2009–2012 Bas van Dijk+Copyright (c) 2009–2017 Bas van Dijk All rights reserved.
Setup.hs view
@@ -1,43 +1,2 @@-#! /usr/bin/env runhaskell--{-# LANGUAGE NoImplicitPrelude #-}--module Main (main) where------------------------------------------------------------------------------------- Imports------------------------------------------------------------------------------------ from base-import Control.Monad ( (>>), return )-import System.IO ( IO )---- from cabal-import Distribution.Simple ( defaultMainWithHooks- , simpleUserHooks- , UserHooks(haddockHook)- , Args- )--import Distribution.Simple.LocalBuildInfo ( LocalBuildInfo(..) )-import Distribution.Simple.Program ( userSpecifyArgs )-import Distribution.Simple.Setup ( HaddockFlags )-import Distribution.PackageDescription ( PackageDescription(..) )------------------------------------------------------------------------------------- Cabal setup program which sets the CPP define '__HADDOCK __' when haddock is run.----------------------------------------------------------------------------------main :: IO ()-main = defaultMainWithHooks hooks- where- hooks = simpleUserHooks { haddockHook = haddockHook' }---- Define __HADDOCK__ for CPP when running haddock.-haddockHook' :: PackageDescription -> LocalBuildInfo -> UserHooks -> HaddockFlags -> IO ()-haddockHook' pkg lbi =- haddockHook simpleUserHooks pkg (lbi { withPrograms = p })- where- p = userSpecifyArgs "haddock" ["--optghc=-D__HADDOCK__"] (withPrograms lbi)+import Distribution.Simple+main = defaultMain
System/USB.hs view
@@ -6,7 +6,7 @@ -------------------------------------------------------------------------------- -- | -- Module : System.USB--- Copyright : (c) 2009–2014 Bas van Dijk+-- Copyright : (c) 2009–2017 Bas van Dijk -- License : BSD-style (see the file LICENSE) -- Maintainer : Bas van Dijk <v.dijk.bas@gmail.com> --
System/USB/Base.hs view
@@ -803,7 +803,7 @@ -- mbVendorId -- mbProductId -- mbDevClass--- (\dev event ->+-- (\\dev event -> -- tryPutMVar mv (dev, event) $> -- DeregisterThisCallback) -- (dev, _event) <- takeMVar mv@@ -874,7 +874,7 @@ -> Ptr () -> IO CInt cb _ctxPtr devPtr ev _userData = do- dev <- mkDev ctx devPtr+ dev <- mask_ $ c'libusb_ref_device devPtr >>= mkDev ctx status <- hotplugCallback dev (HotplugEvent ev) case status of
System/USB/Descriptors.hs view
@@ -6,7 +6,7 @@ -------------------------------------------------------------------------------- -- | -- Module : System.USB.Descriptors--- Copyright : (c) 2009–2014 Bas van Dijk+-- Copyright : (c) 2009–2017 Bas van Dijk -- License : BSD3 (see the file LICENSE) -- Maintainer : Bas van Dijk <v.dijk.bas@gmail.com> --
System/USB/DeviceHandling.hs view
@@ -6,7 +6,7 @@ -------------------------------------------------------------------------------- -- | -- Module : System.USB.Devices--- Copyright : (c) 2009–2014 Bas van Dijk+-- Copyright : (c) 2009–2017 Bas van Dijk -- License : BSD3 (see the file LICENSE) -- Maintainer : Bas van Dijk <v.dijk.bas@gmail.com> --
System/USB/Enumeration.hs view
@@ -6,7 +6,7 @@ -------------------------------------------------------------------------------- -- | -- Module : System.USB.Devices--- Copyright : (c) 2009–2014 Bas van Dijk+-- Copyright : (c) 2009–2017 Bas van Dijk -- License : BSD3 (see the file LICENSE) -- Maintainer : Bas van Dijk <v.dijk.bas@gmail.com> --
System/USB/Exceptions.hs view
@@ -6,7 +6,7 @@ -------------------------------------------------------------------------------- -- | -- Module : System.USB.Exceptions--- Copyright : (c) 2009–2014 Bas van Dijk+-- Copyright : (c) 2009–2017 Bas van Dijk -- License : BSD3 (see the file LICENSE) -- Maintainer : Bas van Dijk <v.dijk.bas@gmail.com> --
System/USB/IO.hs view
@@ -7,7 +7,7 @@ -------------------------------------------------------------------------------- -- | -- Module : System.USB.IO--- Copyright : (c) 2009–2014 Bas van Dijk+-- Copyright : (c) 2009–2017 Bas van Dijk -- License : BSD3 (see the file LICENSE) -- Maintainer : Bas van Dijk <v.dijk.bas@gmail.com> --@@ -61,7 +61,7 @@ #endif ) where -#ifdef __HADDOCK__+#ifdef __HADDOCK_VERSION__ #ifdef HAS_EVENT_MANAGER #if MIN_VERSION_base(4,4,0) import GHC.Event
System/USB/IO/StandardDeviceRequests.hs view
@@ -9,7 +9,7 @@ -------------------------------------------------------------------------------- -- | -- Module : System.USB.IO.StandardDeviceRequests--- Copyright : (c) 2009–2014 Bas van Dijk+-- Copyright : (c) 2009–2017 Bas van Dijk -- License : BSD3 (see the file LICENSE) -- Maintainer : Bas van Dijk <v.dijk.bas@gmail.com> --@@ -80,7 +80,7 @@ , InterfaceNumber , InterfaceAltSetting )-#if __HADDOCK__+#ifdef __HADDOCK_VERSION__ import qualified System.USB.DeviceHandling as USB ( setConfig, getConfig ) #endif
System/USB/IO/Transfers.hs view
@@ -7,7 +7,7 @@ -------------------------------------------------------------------------------- -- | -- Module : System.USB.IO.Transfers--- Copyright : (c) 2009–2014 Bas van Dijk+-- Copyright : (c) 2009–2017 Bas van Dijk -- License : BSD3 (see the file LICENSE) -- Maintainer : Bas van Dijk <v.dijk.bas@gmail.com> -- Stability : Experimental@@ -161,7 +161,7 @@ , getIsochronousWriteTransferPackets ) where -#ifdef __HADDOCK__+#ifdef __HADDOCK_VERSION__ #if MIN_VERSION_base(4,4,0) import GHC.Event #else
System/USB/Initialization.hs view
@@ -7,7 +7,7 @@ -------------------------------------------------------------------------------- -- | -- Module : System.USB.Init--- Copyright : (c) 2009–2014 Bas van Dijk+-- Copyright : (c) 2009–2017 Bas van Dijk -- License : BSD3 (see the file LICENSE) -- Maintainer : Bas van Dijk <v.dijk.bas@gmail.com> --
System/USB/Misc.hs view
@@ -7,7 +7,7 @@ -------------------------------------------------------------------------------- -- | -- Module : System.USB.Misc--- Copyright : (c) 2009–2014 Bas van Dijk+-- Copyright : (c) 2009–2017 Bas van Dijk -- License : BSD3 (see the file LICENSE) -- Maintainer : Bas van Dijk <v.dijk.bas@gmail.com> --
usb.cabal view
@@ -1,10 +1,10 @@ name: usb-version: 1.3.0.4+version: 1.3.0.5 cabal-version: >=1.6-build-type: Custom+build-type: Simple license: BSD3 license-file: LICENSE-copyright: 2009–2014 Bas van Dijk <v.dijk.bas@gmail.com>+copyright: 2009–2017 Bas van Dijk <v.dijk.bas@gmail.com> author: Bas van Dijk <v.dijk.bas@gmail.com> maintainer: Bas van Dijk <v.dijk.bas@gmail.com> homepage: http://basvandijk.github.com/usb@@ -50,6 +50,12 @@ . * \"USB in a NutShell\" (<http://www.beyondlogic.org/usbnutshell/usb1.htm>). +tested-with: GHC == 7.4.1, GHC == 7.4.2,+ GHC == 7.6.1, GHC == 7.6.2, GHC == 7.6.3,+ GHC == 7.8.1, GHC == 7.8.2, GHC == 7.8.3, GHC == 7.8.4+ GHC == 7.10.1, GHC == 7.10.2, GHC == 7.10.3+ GHC == 8.0.1, GHC == 8.0.2+ GHC == 8.3 extra-source-files: README.markdown, Changelog, default.nix, shell.nix @@ -60,11 +66,11 @@ Library GHC-Options: -Wall - build-depends: base >= 4 && < 4.10+ build-depends: base >= 4 && < 4.11 , bindings-libusb >= 1.4.5 && < 1.5 , bytestring >= 0.9 && < 0.11 , text >= 0.5 && < 1.3- , vector >= 0.5 && < 0.12+ , vector >= 0.5 && < 0.13 exposed-modules: System.USB System.USB.Initialization