errno: Stop using _impure_ptr->_errno completely
We use errno AKA _REENT->_errno since the last century and only set _impure_ptr->_errno for backward compat. Stop that. Also, remove the last check for _impure_ptr->_errno in Cygwin code. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@@ -339,7 +339,7 @@ void __reg3
|
||||
seterrno_from_win_error (const char *file, int line, DWORD code)
|
||||
{
|
||||
syscall_printf ("%s:%d windows error %u", file, line, code);
|
||||
errno = _impure_ptr->_errno = geterrno_from_win_error (code, EACCES);
|
||||
errno = geterrno_from_win_error (code, EACCES);
|
||||
}
|
||||
|
||||
int __reg2
|
||||
@@ -357,7 +357,7 @@ seterrno_from_nt_status (const char *file, int line, NTSTATUS status)
|
||||
SetLastError (code);
|
||||
syscall_printf ("%s:%d status %y -> windows error %u",
|
||||
file, line, status, code);
|
||||
errno = _impure_ptr->_errno = geterrno_from_win_error (code, EACCES);
|
||||
errno = geterrno_from_win_error (code, EACCES);
|
||||
}
|
||||
|
||||
static char *
|
||||
|
Reference in New Issue
Block a user