[Haskell-cafe] FFI question

Vasili I. Galchin vigalchin at gmail.com
Wed Sep 10 04:50:38 UTC 2014


Bottom line is how can I do arithmetic (addition) on two #const's ???

I can hard code a "3" => nasty solution ...

Kind thanks,

Vasili

On Tue, Sep 9, 2014 at 10:53 PM, Vasili I. Galchin <vigalchin at gmail.com> wrote:
> oops ... let me check ..
>
> on the other hand after rereading man page on POSIX mlockall I noticed
> that "flags" formal parameter .. .I noticed that can be OR'd .. hence
> I want to OR MCL_CURRENT and MCL_FUTURE  ... fix this then ...
>
> back to helping Ukraina before V.V.Putin does more nastiness ....
>
> Kind thanks,
>
> Vasya
>
> On Tue, Sep 9, 2014 at 10:41 PM, Brandon Allbery <allbery.b at gmail.com> wrote:
>> On Tue, Sep 9, 2014 at 11:36 PM, Vasili I. Galchin <vigalchin at gmail.com>
>> wrote:
>>>
>>> >        Did a find/grep under my posix-realtime  directory .. no
>>> > definition of MCL_CURRENT, MCL_FUTURE or MCL_CURRENTandFUTURE!! But If
>>> > I comment out the case arm MCL_CURRENTandFUTURE in my LockMem.hsc file
>>> > and run "cabal build" from the directory where my *.cabal file lives
>>> > .. clean compile ... Sigh!??!!
>>
>>
>> The fact that they start with uppercase tells me that they are from C, not
>> Haskell. The implication of their relationship with mlockall is that they
>> come from a related system header file, namely <sys/mman.h>.
>>
>> I note that neither my FreeBSD nor my OS X system defines
>> MCL_CURRENTandFUTURE in /usr/include/sys/mman.h, although the other two are
>> defined.
>>
>> --
>> brandon s allbery kf8nh                               sine nomine associates
>> allbery.b at gmail.com                                  ballbery at sinenomine.net
>> unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net


More information about the Haskell-Cafe mailing list