[plt-scheme] ffi question and accessing errno
Eli Barzilay wrote:
> On Mar 5, Marco Maggi wrote:
>> Ciao,
>>
>> I am experimenting with the FFI with PLT 372 on GNU+Linux; is it
>> possible to access "errno"?
>
> Not really. You can, like any other C variable, but the problem is
> that you want the value grabbed right after the foreign call -- if you
> do it later, then the value is likely to have changed so that it
> doesn't help. I'll need to extend the C part of the foreign interface
> to make it available somehow (I still didn't figure out what's the
> best way to address this problem).
Maybe store errno in a Scheme parameter after each FFI call?
--
regards,
Jakub Piotr Cłapa