[commit: ghc] master: base: kevent.filter is signed (ecb880c)

git at git.haskell.org git at git.haskell.org
Tue Mar 7 18:32:56 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/ecb880caea441b6dd7f75a555546e55abe11c233/ghc

>---------------------------------------------------------------

commit ecb880caea441b6dd7f75a555546e55abe11c233
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Tue Mar 7 09:31:42 2017 -0500

    base: kevent.filter is signed
    
    I checked both the FreeBSD and Darwin manpages; it's signed in both cases.
    This was producing validation failures on OS X due to the new literal
    range-check.


>---------------------------------------------------------------

ecb880caea441b6dd7f75a555546e55abe11c233
 libraries/base/GHC/Event/KQueue.hsc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libraries/base/GHC/Event/KQueue.hsc b/libraries/base/GHC/Event/KQueue.hsc
index d6461c2..0d5350e 100644
--- a/libraries/base/GHC/Event/KQueue.hsc
+++ b/libraries/base/GHC/Event/KQueue.hsc
@@ -186,10 +186,10 @@ newtype Flag = Flag Word16
  , flagOneshot = EV_ONESHOT
  }
 
-#if SIZEOF_KEV_FILTER == 4 /*kevent.filter: uint32_t or uint16_t. */
-newtype Filter = Filter Word32
+#if SIZEOF_KEV_FILTER == 4 /*kevent.filter: int32_t or int16_t. */
+newtype Filter = Filter Int32
 #else
-newtype Filter = Filter Word16
+newtype Filter = Filter Int16
 #endif
     deriving (Bits, FiniteBits, Eq, Num, Show, Storable)
 



More information about the ghc-commits mailing list