mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-05 12:18:13 +02:00
Don't fake network errno values on Windows
Don't pretend there exists errno values for some network errors in the Microsoft C library. Just use the WinSock error values.
This commit is contained in:
parent
9bb7297ad7
commit
ad8bc4c6b3
2 changed files with 3 additions and 7 deletions
|
|
@ -49,10 +49,6 @@
|
|||
#error This does not look like Win32 and the Microsoft C library
|
||||
#endif
|
||||
|
||||
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
|
||||
#define EAFNOSUPPORT WSAEAFNOSUPPORT
|
||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||
|
||||
#define DBUS_SOCKET_IS_INVALID(s) ((SOCKET)(s) == INVALID_SOCKET)
|
||||
#define DBUS_SOCKET_API_RETURNS_ERROR(n) ((n) == SOCKET_ERROR)
|
||||
#define DBUS_SOCKET_SET_ERRNO() errno = WSAGetLastError()
|
||||
|
|
|
|||
|
|
@ -1070,7 +1070,7 @@ _dbus_poll (DBusPollFD *fds,
|
|||
if (DBUS_SOCKET_API_RETURNS_ERROR (ready))
|
||||
{
|
||||
DBUS_SOCKET_SET_ERRNO ();
|
||||
if (errno != EWOULDBLOCK)
|
||||
if (errno != WSAEWOULDBLOCK)
|
||||
_dbus_verbose ("WSAWaitForMultipleEvents: failed: %s\n", strerror (errno));
|
||||
ret = -1;
|
||||
}
|
||||
|
|
@ -1208,7 +1208,7 @@ _dbus_poll (DBusPollFD *fds,
|
|||
if (DBUS_SOCKET_API_RETURNS_ERROR (ready))
|
||||
{
|
||||
DBUS_SOCKET_SET_ERRNO ();
|
||||
if (errno != EWOULDBLOCK)
|
||||
if (errno != WSAEWOULDBLOCK)
|
||||
_dbus_verbose ("select: failed: %s\n", _dbus_strerror (errno));
|
||||
}
|
||||
else if (ready == 0)
|
||||
|
|
@ -3224,7 +3224,7 @@ _dbus_flush_caches (void)
|
|||
dbus_bool_t
|
||||
_dbus_get_is_errno_eagain_or_ewouldblock (void)
|
||||
{
|
||||
return errno == EAGAIN || errno == EWOULDBLOCK;
|
||||
return errno == WSAEWOULDBLOCK;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue