[daemon-fix] fixed querying about name information
[platform/upstream/dbus.git] / dbus / dbus-sockets-win.h
index 371672e..4e1ab8c 100644 (file)
@@ -17,7 +17,7 @@
  * 
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  *
  */
 
 
 #undef interface
 
+#if HAVE_ERRNO_H
 #include <errno.h>
-
-/* 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 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()
+#define DBUS_SOCKET_SET_ERRNO() (_dbus_win_set_errno (WSAGetLastError()))
 
 #define DBUS_CLOSE_SOCKET(s) closesocket(s)