A function declared with errno = TRUE has errno cleared before each
call and saved immediately after it, before R runs anything that could
change it; on Windows the same declaration saves GetLastError() too.
ffi_errno() and ffi_last_error() return the values the latest such
call saved.
Value
ffi_errno(): an integer, 0 until a call has saved one.
ffi_last_error(): a double, NA on platforms other than Windows.