head 1.2; access; symbols pkgsrc-2026Q1:1.2.0.20 pkgsrc-2026Q1-base:1.2 pkgsrc-2025Q4:1.2.0.18 pkgsrc-2025Q4-base:1.2 pkgsrc-2025Q3:1.2.0.16 pkgsrc-2025Q3-base:1.2 pkgsrc-2025Q2:1.2.0.14 pkgsrc-2025Q2-base:1.2 pkgsrc-2025Q1:1.2.0.12 pkgsrc-2025Q1-base:1.2 pkgsrc-2024Q4:1.2.0.10 pkgsrc-2024Q4-base:1.2 pkgsrc-2024Q3:1.2.0.8 pkgsrc-2024Q3-base:1.2 pkgsrc-2024Q2:1.2.0.6 pkgsrc-2024Q2-base:1.2 pkgsrc-2024Q1:1.2.0.4 pkgsrc-2024Q1-base:1.2 pkgsrc-2023Q4:1.2.0.2 pkgsrc-2023Q4-base:1.2 pkgsrc-2023Q3:1.1.0.20 pkgsrc-2023Q3-base:1.1 pkgsrc-2023Q2:1.1.0.18 pkgsrc-2023Q2-base:1.1 pkgsrc-2023Q1:1.1.0.16 pkgsrc-2023Q1-base:1.1 pkgsrc-2022Q4:1.1.0.14 pkgsrc-2022Q4-base:1.1 pkgsrc-2022Q3:1.1.0.12 pkgsrc-2022Q3-base:1.1 pkgsrc-2022Q2:1.1.0.10 pkgsrc-2022Q2-base:1.1 pkgsrc-2022Q1:1.1.0.8 pkgsrc-2022Q1-base:1.1 pkgsrc-2021Q4:1.1.0.6 pkgsrc-2021Q4-base:1.1 pkgsrc-2021Q3:1.1.0.4 pkgsrc-2021Q3-base:1.1 pkgsrc-2021Q2:1.1.0.2 pkgsrc-2021Q2-base:1.1; locks; strict; comment @# @; 1.2 date 2023.10.24.10.42.22; author pho; state Exp; branches; next 1.1; commitid GPeF8aU6YrcVNRJE; 1.1 date 2021.04.24.05.17.54; author pho; state Exp; branches; next ; commitid KSBP2LTkPit7mvQC; desc @@ 1.2 log @time/hs-clock: Update to 0.8.4 No change log is provided by the upstream. @ text @$NetBSD: patch-System_Clock.hsc,v 1.1 2021/04/24 05:17:54 pho Exp $ Suppress linker warnings about compatibility symbols by using "capi" instead of "ccall". --- System/Clock.hsc.orig 2001-09-09 01:46:40.000000000 +0000 +++ System/Clock.hsc @@@@ -149,8 +149,8 @@@@ type ClockId = CClockId type ClockId = #{type clockid_t} #endif -foreign import ccall unsafe clock_gettime :: ClockId -> Ptr TimeSpec -> IO CInt -foreign import ccall unsafe clock_getres :: ClockId -> Ptr TimeSpec -> IO CInt +foreign import capi unsafe "time.h clock_gettime" clock_gettime :: ClockId -> Ptr TimeSpec -> IO CInt +foreign import capi unsafe "time.h clock_getres" clock_getres :: ClockId -> Ptr TimeSpec -> IO CInt foreign import capi unsafe "time.h value CLOCK_MONOTONIC" clock_MONOTONIC :: ClockId foreign import capi unsafe "time.h value CLOCK_REALTIME" clock_REALTIME :: ClockId @ 1.1 log @Update to clock-0.8.2 No change logs are provided by the upstream. @ text @d1 1 a1 1 $NetBSD$ d8 3 a10 5 @@@@ -2,6 +2,7 @@@@ -- systems. This module is being developed according to IEEE Std -- 1003.1-2008: , -- +{-# LANGUAGE CApiFFI #-} d12 4 a15 11 {-# OPTIONS_GHC -fno-warn-type-defaults #-} -- To allow importing Data.Int and Data.Word indiscriminately on all platforms, @@@@ -129,8 +130,8 @@@@ foreign import ccall unsafe hs_clock_win foreign import ccall unsafe hs_clock_win32_getres_processtime :: Ptr TimeSpec -> IO () foreign import ccall unsafe hs_clock_win32_getres_threadtime :: Ptr TimeSpec -> IO () #else -foreign import ccall unsafe clock_gettime :: #{type clockid_t} -> Ptr TimeSpec -> IO CInt -foreign import ccall unsafe clock_getres :: #{type clockid_t} -> Ptr TimeSpec -> IO CInt +foreign import capi unsafe "time.h clock_gettime" clock_gettime :: #{type clockid_t} -> Ptr TimeSpec -> IO CInt +foreign import capi unsafe "time.h clock_getres" clock_getres :: #{type clockid_t} -> Ptr TimeSpec -> IO CInt #endif d17 2 a18 1 #if !defined(_WIN32) @