struct GNUNET_NETWORK_Handle
{
+#ifndef MINGW
int fd;
+#else
+ SOCKET fd;
+#endif
};
#ifdef WINDOWS
/**
- * Linked list of handles
+ * Linked list of handles
*/
struct GNUNET_CONTAINER_SList *handles;
#endif
int pending;
/* How much is there to be read? */
+#ifndef WINDOWS
error = ioctl (desc->fd, FIONREAD, &pending);
-
if (error == 0)
+#else
+ error = ioctlsocket (desc->fd, FIONREAD, &pending);
+ if (error != SOCKET_ERROR)
+#endif
return pending;
else
- return error;
+ return GNUNET_NO;
}
/**