This module defines a couple of method to set and get errno
for current thread.
static VALUE get_last_error(VALUE self) { return INT2NUM(thread_data_get()->td_errno); }
static VALUE set_last_error(VALUE self, VALUE error) { #ifdef _WIN32 SetLastError(NUM2INT(error)); #else errno = NUM2INT(error); #endif return Qnil; }