[plt-scheme] ffi & errno

From: YC (yinso.chen at gmail.com)
Date: Fri Jul 25 02:45:14 EDT 2008

Hi -

I found this thread discussing FFI & errno -
http://list.cs.brown.edu/pipermail/plt-scheme/2008-March/023478.html.  Is
there a potential solution on the horizon?

I currently wrap it in a procedure as follows:

(define (libc:errno)
  (get-ffi-obj "errno" libc _int
               (lambda ()
                 (error 'libc:errno
                        "unable to retrieve errno"))))

Is this even close?  I imagine that it's possible for mzscheme to set errno
before I retrieve the value...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20080724/7ac9841b/attachment.html>

Posted on the users mailing list.