mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
common,w32: Add missing GetLastError->errno mapping.
* common/iobuf.c (file_filter, sock_filter): Add missing mapping. -- GnuPG-bug-id: 6528 (cherry picked from commit5e94470d05
) Also includes commita3be97df4d
This commit is contained in:
parent
bb157044a0
commit
1e9ac18f88
3 changed files with 9 additions and 6 deletions
|
@ -319,15 +319,17 @@ map_w32_to_errno (DWORD w32_err)
|
|||
#endif /*HAVE_W32_SYSTEM*/
|
||||
|
||||
|
||||
/* Set ERRNO from the Windows error. EC may be -1 to use the last error. */
|
||||
/* Set ERRNO from the Windows error. EC may be -1 to use the last
|
||||
* error. Returns the Windows error code. */
|
||||
#ifdef HAVE_W32_SYSTEM
|
||||
void
|
||||
int
|
||||
gnupg_w32_set_errno (int ec)
|
||||
{
|
||||
/* FIXME: Replace by gpgrt_w32_set_errno. */
|
||||
if (ec == -1)
|
||||
ec = GetLastError ();
|
||||
_set_errno (map_w32_to_errno (ec));
|
||||
return ec;
|
||||
}
|
||||
#endif /*HAVE_W32_SYSTEM*/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue