Quote Originally Posted by Brafil View Post
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.
I side with brewbuck because in order to explicitly test the value of errno, it needs to be set to zero before making any function calls.