267acd1423
GHC: The Glasgow Haskell Compiler. The Glasgow Haskell Compiler is a robust, fully-featured, optimising compiler for the functional programming language Haskell 98 (http://www.haskell.org). GHC compiles Haskell to either native code or C. It implements numerous experimental language extensions to Haskell, including concurrency, a foreign language interface, several type-system extensions, exceptions, and so on. GHC comes with a generational garbage collector, a space and time profiler, and a comprehensive set of libraries. This package provides the 8.8.x release series.
16 lines
670 B
Haskell
16 lines
670 B
Haskell
$NetBSD: patch-libraries_base_System_CPUTime_Posix_Times.hsc,v 1.1 2020/01/09 12:32:24 pho Exp $
|
|
|
|
Suppress linker warnings about compatibility syscall wrappers by using
|
|
"capi" instead of "ccall".
|
|
|
|
--- libraries/base/System/CPUTime/Posix/Times.hsc.orig 2020-01-04 12:08:39.515726533 +0000
|
|
+++ libraries/base/System/CPUTime/Posix/Times.hsc
|
|
@@ -27,7 +27,7 @@ getCPUTime = allocaBytes (#const sizeof(
|
|
`div` fromIntegral clockTicks)
|
|
|
|
type CTms = ()
|
|
-foreign import ccall unsafe times :: Ptr CTms -> IO CClock
|
|
+foreign import capi unsafe "sys/times.h times" times :: Ptr CTms -> IO CClock
|
|
|
|
getCpuTimePrecision :: IO Integer
|
|
getCpuTimePrecision =
|