GNOME Bugzilla – Bug 684278
Fix GIO build on Windows
Last modified: 2012-09-20 00:35:37 UTC
Created attachment 224583 [details] [review] Conditionally process the code using g_content_type_get_symbolic_icon() and g_content_type_get_generic_icon_name() Hi, The recent additions of g_content_type_get_symbolic_icon() and g_content_type_get_generic_icon_name() seem to be only for *nix, at least for now, so the unconditional addition of these APIs into gio.symbols broke the build on Windows. Likewise, gio/glocalfileinfo.c called g_content_type_get_symbolic_icon() unconditionally, which also broke the Windows build. The attached patch attempts to fix this by guarding them with #ifdef G_OS_UNIX, at least for the time being until the afore-mentioned functions becomes usable for Windows. With blessings, thank you!
Review of attachment 224583 [details] [review]: Can you elaborate on "don't seem to be for Windows"? It looks like we were calling into the xdg_ functions there before, so the new API shouldn't have introduced a regression. Whether it makes sense to use the XDG stuff on Windows is a separate question...
Basically, what's the build failure on Windows without your patch?
Hi Colin, (In reply to comment #1) > It looks like we were > calling into the xdg_ functions there before Well, gcontenttype.c was split up into gcontenttype.c (*nix-where the new functions reside in, from commits cc3238a9c and 40b4fae4) and gcontenttype-win32.c (Windows) in commit 32192ee9 (Split gcontenttype.c), and by looking through gio/Makefile.am, neither the sources in gio/xdgmime/ nor gcontenttype.c is built on Windows, so this is the reason why I believed those functions aren't for Windows. (In reply to comment #2) > Basically, what's the build failure on Windows without your patch? Umm..., gio will fail to link (undefined symbols on the two functions that I've mentioned in the initial bug report). The best fix is to try to determine the way the two functions will work (if applicable) on Windows and get that into gcontenttype-win32.c, but before that I guess the best thing is to conditionally compile the code, and/or add a stub/TODO: in gcontenttype-win32.c. With blessings, and thanks for the notes.
Review of attachment 224583 [details] [review]: I see, thanks for the explanation. Looks OK to me.
Review of attachment 224583 [details] [review]: This patch is pushed as 3dd65859. With blessings, thank you!
*** Bug 684414 has been marked as a duplicate of this bug. ***