[commit: packages/time] ghc,master: Fix #ifdef (05776df)

git at git.haskell.org git at git.haskell.org
Wed Jul 19 22:05:41 UTC 2017


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

On branches: ghc,master
Link       : http://git.haskell.org/packages/time.git/commitdiff/05776dfaa74cdccbaa80ecdf7dd6fe48e9ae203b

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

commit 05776dfaa74cdccbaa80ecdf7dd6fe48e9ae203b
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Sun Apr 30 08:48:25 2017 -0400

    Fix #ifdef
    
    GHC is now compiled with -Werror=undef; explicitly use #ifdef instead
    of #if


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

05776dfaa74cdccbaa80ecdf7dd6fe48e9ae203b
 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