[Bug 24395] Issues making telepathy-gabble 0.8.3 work on windows

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Oct 28 16:08:54 CET 2009


http://bugs.freedesktop.org/show_bug.cgi?id=24395





--- Comment #14 from Simon McVittie <simon.mcvittie at collabora.co.uk>  2009-10-28 08:08:54 PST ---
(From update of attachment 30763)
>+#ifdef HAVE_SYS_SOCKET_H
> #include <sys/socket.h>
>+#endif

I think a better approach to this would be to have a "meta-header" which
includes all the misc socket stuff on Unix, or winsock on Windows. I've
implemented this in an updated 08-portability branch which I'll push soon.

>+#ifdef HAVE_RES_QUERY

I haven't looked at the DNS stuff yet.

>diff --git a/lib/gibber/gibber-tcp-transport.c b/lib/gibber/gibber-tcp-transport.c
>index 12f98a0..c46a991 100644
>--- a/lib/gibber/gibber-tcp-transport.c
>+++ b/lib/gibber/gibber-tcp-transport.c
>@@ -38,6 +38,10 @@
> 
> #include "errno.h"
> 
>+#ifdef WIN32
>+#include "errno-win32-extend.h"
>+#endif

errno is used in one place in this file.

A cursory web search indicates that winsock doesn't return its errors in errno,
so you're wrong to look in errno to check for its errors.

In any case, I think a better approach is to have a wrapper function
gibber_connect_errno_requires_retry() which does the right thing on either
platform (either errno or WSALastError()).

>+#ifdef GIBBER_TYPE_UNIX_TRANSPORT

This won't work as desired unless the corresponding header has already been
included. I switched this check to G_OS_UNIX, with a comment explaining why.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the telepathy-bugs mailing list