From da07df1ef6edc8638c1caccfcff868d9a2fadca0 Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Fri, 10 Apr 2009 10:42:56 +0000 Subject: finit not required for ghc >= 6.10.2 --- lib/Data/Packed/Internal/Common.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/Data/Packed/Internal') diff --git a/lib/Data/Packed/Internal/Common.hs b/lib/Data/Packed/Internal/Common.hs index 46e9612..2310f5f 100644 --- a/lib/Data/Packed/Internal/Common.hs +++ b/lib/Data/Packed/Internal/Common.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -fglasgow-exts #-} +{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Packed.Internal.Common @@ -87,7 +87,9 @@ foreign import ccall "asm_finit" finit :: IO () -- | check the error code check :: String -> IO CInt -> IO () check msg f = do +#if FINIT finit +#endif err <- f when (err/=0) $ if err > 1024 then (error (msg++": "++errorCode err)) -- our errors -- cgit v1.2.3