[commit: packages/time] master: test using "#ifdef" for HAVE_CLOCK_GETTIME (d9e3430)
git at git.haskell.org
git at git.haskell.org
Fri Apr 21 16:57:51 UTC 2017
Repository : ssh://git@git.haskell.org/time
On branch : master
Link : http://git.haskell.org/packages/time.git/commitdiff/d9e34309a9f57cddb1d3806998a62a15795ff4b1
>---------------------------------------------------------------
commit d9e34309a9f57cddb1d3806998a62a15795ff4b1
Author: Gabor Greif <ggreif at gmail.com>
Date: Wed Apr 5 17:55:09 2017 +0200
test using "#ifdef" for HAVE_CLOCK_GETTIME
GHC has recently tightened preprocessor checks,
so this "#elif" started to fail.
>---------------------------------------------------------------
d9e34309a9f57cddb1d3806998a62a15795ff4b1
lib/Data/Time/Clock/Internal/SystemTime.hs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/Data/Time/Clock/Internal/SystemTime.hs b/lib/Data/Time/Clock/Internal/SystemTime.hs
index 6027cdf..b87d302 100644
--- a/lib/Data/Time/Clock/Internal/SystemTime.hs
+++ b/lib/Data/Time/Clock/Internal/SystemTime.hs
@@ -19,7 +19,7 @@ import Data.Time.Clock.Internal.DiffTime
#ifdef mingw32_HOST_OS
import qualified System.Win32.Time as Win32
-#elif HAVE_CLOCK_GETTIME
+#elif defined(HAVE_CLOCK_GETTIME)
import Data.Time.Clock.Internal.CTimespec
import Foreign.C.Types (CTime(..), CLong(..))
#else
@@ -67,7 +67,7 @@ getSystemTime = do
getTime_resolution = 100E-9 -- 100ns
getTAISystemTime = Nothing
-#elif HAVE_CLOCK_GETTIME
+#elif defined(HAVE_CLOCK_GETTIME)
-- Use hi-res clock_gettime
timespecToSystemTime :: CTimespec -> SystemTime
More information about the ghc-commits
mailing list