Closed GoogleCodeExporter closed 9 years ago
I have implemented a setter by using the FFI to
call the function "__errno_location()", which
returns the pointer to the (thread specific)
"errno" variable, and then using the poker
for "int".
From my limited testing so far it works.
Original comment by mrc....@gmail.com
on 5 Jan 2009 at 9:56
Thank you for your message and sorry for not getting back to you sooner.
I have added shared-object-errno and shared-object-win32-lasterror to revision
343.
shared-object-errno is a parameter and it capture and holds errno set by last
ffi call.
To set specific value to errno, use (shared-object-errno <new-value>).
shared-object-errno works on windows also.
(c-ffi-func1 ...)
(shared-object-errno) returns errno value set by c-ffi-func1
(shared-object-errno 0) resets errno to 0
(shared-object-errno) returns 0
(c-ffi-func2 ...)
(shared-object-errno) returns errno value set by c-ffi-func2
Please try. Thank you!
-- fujita
Original comment by y.fujita...@gmail.com
on 6 Jan 2009 at 1:33
Sorry for the wrong report! Is it already there in version 335?
I used SHARED-OBJECT-ERRNO as a getter but I had not noticed
that it is a parameter.
Thanks!
Original comment by mrc....@gmail.com
on 6 Jan 2009 at 7:33
Original issue reported on code.google.com by
mrc....@gmail.com
on 2 Jan 2009 at 9:16