[Bug 24395] Issues making telepathy-gabble 0.8.3 work on windows
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Oct 13 20:58:04 CEST 2009
http://bugs.freedesktop.org/show_bug.cgi?id=24395
Simon McVittie <simon.mcvittie at collabora.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://git.collabora.co.uk/?
| |p=user/smcv/telepathy-
| |gabble-
| |smcv.git;a=shortlog;h=refs/h
| |eads/08-portability
--- Comment #4 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2009-10-13 11:58:04 PST ---
My 08-portability branch applies some of these changes, in what I believe to be
a better way. Gabble won't build on Windows with only that branch, but it's a
start. Could you try it out?
http://git.collabora.co.uk/?p=user/smcv/telepathy-gabble-smcv.git;a=shortlog;h=refs/heads/08-portability
git://git.collabora.co.uk/git/user/smcv/telepathy-gabble-smcv.git
In particular:
(In reply to comment #3)
> (We do need to check for OS for credentials-passing - every Unix OS implements
> it differently, and so far we only know how on Linux, so in git master we use
> #ifdef __linux__.)
I've backported this.
> As another general matter of approach, Telepathy has feature discovery in many
> places. If you're going to make Unix sockets not work, for instance (this is
> entirely reasonable, because Windows doesn't have them!) then you need to make
> the feature-discovery function not return them as an option.
I've fixed this correctly, including the regression tests.
> Similarly, GibberUnixTransport should simply not be compiled, unless G_OS_UNIX
> is defined. It doesn't make sense to try to force it to compile on non-Unix
> platforms.
I've done this.
> Tubes and file transfer should be able to work even on Windows, using IPv4
> sockets; we have the code for it.
This might not work, in fact, since Gibber assumes that g_io_channel_unix_new()
is sufficient. Gibber needs to use g_io_channel_win32_new_socket() on Windows -
this is a situation where an OS-dependent wrapper function would be useful:
static inline GIOChannel *
gibber_g_io_channel_new_socket (gint fd, gboolean is_socket G_GNUC_UNUSED)
{
#ifdef G_OS_WIN32
if (is_socket)
{
return g_io_channel_win32_new_socket (fd);
}
else
{
return g_io_channel_unix_new (fd);
}
#else
return g_io_channel_unix_new (fd);
#endif
}
with the boolean for "is it a socket?" coming from the logic of the surrounding
code.
However, it might be the case that this is considerably easier to fix by
relying on gnio (GLib 2.22), which is unacceptable for the 0.8 branch but is
reasonable to do on the 0.9 branch.
> If these headers are non-portable, they should be checked for in configure.ac,
> and guarded by #ifdef HAVE_FOO_H.
As a starting point, I've done this for unistd.h.
> This should either just use tp_debug_timestamped_log_handler (beware that the
> behaviour seems to be subtly different), or have the same fix as
> telepathy-glib.
In my branch, it wraps tp_debug_timestamped_log_handler in order to get the
differing behaviour.
> This should use ##__VA_ARGS__ like we do in debug.h, probably - that's
> theoretically non-portable, but in practice we haven't had complaints about
> debug.h, so...
Done in the branch.
> This may well be able to use g_time_val_from_iso8601
Done in the branch.
> Will you ever receive credentials on Windows? If so, how?
Never called on Windows in the branch, which is the right approach.
> >@@ -1426,7 +1435,9 @@ tube_msg_close (GabbleTubesChannel *self,
> >
> > close_node = lm_message_node_get_child_with_namespace (msg->node, "close",
> > NS_TUBES);
> >+#ifndef WIN32
> > g_assert (close != NULL);
> >+#endif
Fixed in the branch.
> >diff --git a/tools/glib-ginterface-gen.py b/tools/glib-ginterface-gen.py
>
> This has already been fixed in telepathy-glib
Updated in the branch.
--
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