Created attachment 21802 [details] [review] Patch to fix Windows compilation errros When compiling on Windows msvc compiler, I had three problems with telepathy-glib. 1) unistd.h was not available. Attached patch conditionally includes it. 2) msvc compiler does allow void pointer arithmetic. I type casted it to guint8* for addition because that is what we meant. 3) msvc compiler seems have problems with empty structures. One private member structure for a class was empty. For lack of better ideas, I removed the structure.
For (2) and (3) GCC can warning. I don't know which flags are needed, but for Empathy that kind of code generate a warning.
1) Thanks, patch applied in git. 2) Coincidentally I fixed this bug, and added the warning Xavier mentioned, just before Christmas :-) The patch was merged in git yesterday. 3) Thanks, patch applied in git. I can't find a warning option that would warn about use of this gcc extension, though. There should hopefully be a release with all three fixes later today.
Thanks Simon, I also had to make the following change in the generated code. I don't recollect perfectly but I think it was because of the empty initialization. Should the code generator be fixed? --- telepathy-glib/telepathy-glib/_gen/tp-svc-channel.c +++ telepathy-glib/telepathy-glib/_gen/tp-svc-channel.c @@ -2122,12 +2122,10 @@ tp_svc_channel_type_contact_list_base_in tp_svc_channel_type_contact_list_base_init_once (klass); } } -static const DBusGMethodInfo _tp_svc_channel_type_contact_list_methods[] = { -}; static const DBusGObjectInfo _tp_svc_channel_type_contact_list_object_info = { 0, - _tp_svc_channel_type_contact_list_methods, + NULL, 0, "\0", "\0\0",
Retitling to reflect the remaining change. We should edit the code-generator rather than the generated code.
Fixed in 0.7.23
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.