From 3de1b88339b5814b4877d9f264a8d5f10a4a769e Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 18 Jun 2019 11:33:44 +0100 Subject: [PATCH] gcontenttype: Add no-op versions of {get,set}_mime_dirs() on win32/macOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These are here to prevent linker errors, since `gcontenttype.[ch]` aren’t compiled on Windows or macOS. The implementations are stubs to be filled out by someone who knows each platform, at some point in the future. Signed-off-by: Philip Withnall Fixes: #1791 --- gio/gcontenttype-win32.c | 15 +++++++++++++++ gio/gosxcontenttype.m | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/gio/gcontenttype-win32.c b/gio/gcontenttype-win32.c index 74d1b704c..2f07fa36e 100644 --- a/gio/gcontenttype-win32.c +++ b/gio/gcontenttype-win32.c @@ -83,6 +83,21 @@ get_registry_classes_key (const char *subdir, return value_utf8; } +/*< private >*/ +void +g_content_type_set_mime_dirs (const gchar * const *dirs) +{ + /* noop on Windows */ +} + +/*< private >*/ +const gchar * const * +g_content_type_get_mime_dirs (void) +{ + const gchar * const *mime_dirs = { NULL }; + return mime_dirs; +} + gboolean g_content_type_equals (const gchar *type1, const gchar *type2) diff --git a/gio/gosxcontenttype.m b/gio/gosxcontenttype.m index 52ba5763a..6119bbcae 100644 --- a/gio/gosxcontenttype.m +++ b/gio/gosxcontenttype.m @@ -100,6 +100,21 @@ create_cstr_from_cfstring_with_fallback (CFStringRef str, return cstr; } +/*< private >*/ +void +g_content_type_set_mime_dirs (const gchar * const *dirs) +{ + /* noop on macOS */ +} + +/*< private >*/ +const gchar * const * +g_content_type_get_mime_dirs (void) +{ + const gchar * const *mime_dirs = { NULL }; + return mime_dirs; +} + gboolean g_content_type_equals (const gchar *type1, const gchar *type2)