Re: [base] CLK_TCK issue for QNXNTO

Stephen Paul Weber <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Somebody claiming to be Stephen Paul Weber wrote:
>When I try to build base for QNXNTO (BlackBerry 10) using my 
>cross-compiler I get an error about "test_array is not of static size" or 
>similar.
>
>-#if defined(CLK_TCK)
>+#if defined(CLK_TCK) && !defined(__QNXNTO__)
>     (#const CLK_TCK)
> #else
>     unsafePerformIO (sysconf (#const _SC_CLK_TCK) >>= return . fromIntegral)

Looking up CLK_TCK in the QNXNTO time.h:

/* CLK_TCK removed in 1003.1-2001 */
# define CLK_TCK _sysconf(3) /* 3 == _SC_CLK_TCK */

This looks to me to be identical to the `unsafePerformIO` call in the 
`#else` clause in base.  So my patch is safe.  It's probably not ideal, 
though.  What would be the preferred way to fix this (I mean a way that 
would have any chance of getting mainlined).

If CLK_TCK is deprecated, shouldn't GHC just stop using it?

-- 
Stephen Paul Weber, @singpolyma
See <http://singpolyma.net> for how I prefer to be contacted
edition right joseph
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.