X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=dbus%2Fdbus-sockets-win.h;h=4e1ab8ca098d0c5275e306d0ea7f9a86bc2a84a7;hb=04c58b9e5fbdf3acc7565f989e5fcd11f0c23c57;hp=0af5e7b921e82baeff25567e94cac583e3c23c13;hpb=ad8bc4c6b336e7f833505609fbab178e76f961a2;p=platform%2Fupstream%2Fdbus.git diff --git a/dbus/dbus-sockets-win.h b/dbus/dbus-sockets-win.h index 0af5e7b..4e1ab8c 100644 --- a/dbus/dbus-sockets-win.h +++ b/dbus/dbus-sockets-win.h @@ -37,21 +37,13 @@ #undef interface +#if HAVE_ERRNO_H #include - -/* Make use of the fact that the WSAE* error codes don't - * overlap with errno E* codes. Wrapper functions store - * the return value from WSAGetLastError() in errno. - */ -#if defined(EPROTONOSUPPORT) || \ - defined(EAFNOSUPPORT) || \ - defined(EWOULDBLOCK) -#error This does not look like Win32 and the Microsoft C library #endif #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() +#define DBUS_SOCKET_SET_ERRNO() (_dbus_win_set_errno (WSAGetLastError())) #define DBUS_CLOSE_SOCKET(s) closesocket(s)