Originally Posted by
Brafil
PS: I think setting errno is not really portable, since some (many?) libraries define a function to return errno for the specific thread as errno (#define error _get_thread_errno()) And you can't assign to a function call.