From f957ee0aeb2902710e677b566c1ad36393ed0323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 1 Mar 2009 20:18:30 +0100 Subject: xdgmime: Use g_pattern_match_simple() instead of fnmatch() for Win32 compatibility --- gst/xdgmime/xdgmime/xdgmimealias.c | 1 - gst/xdgmime/xdgmime/xdgmimecache.c | 3 +-- gst/xdgmime/xdgmime/xdgmimeglob.c | 5 +++-- gst/xdgmime/xdgmime/xdgmimeicon.c | 1 - gst/xdgmime/xdgmime/xdgmimeparent.c | 1 - 5 files changed, 4 insertions(+), 7 deletions(-) (limited to 'gst/xdgmime') diff --git a/gst/xdgmime/xdgmime/xdgmimealias.c b/gst/xdgmime/xdgmime/xdgmimealias.c index f37c900d..5e9b7089 100644 --- a/gst/xdgmime/xdgmime/xdgmimealias.c +++ b/gst/xdgmime/xdgmime/xdgmimealias.c @@ -35,7 +35,6 @@ #include #include #include -#include #ifndef FALSE #define FALSE (0) diff --git a/gst/xdgmime/xdgmime/xdgmimecache.c b/gst/xdgmime/xdgmime/xdgmimecache.c index e1c1b34f..ec665d0d 100644 --- a/gst/xdgmime/xdgmime/xdgmimecache.c +++ b/gst/xdgmime/xdgmime/xdgmimecache.c @@ -34,7 +34,6 @@ #include #include -#include #include #include @@ -388,7 +387,7 @@ cache_glob_lookup_fnmatch (const char *file_name, mime_type = cache->buffer + mimetype_offset; /* FIXME: Not UTF-8 safe */ - if (fnmatch (ptr, file_name, 0) == 0) { + if (g_pattern_match_simple (ptr, file_name) != 0) { mime_types[n].mime = mime_type; mime_types[n].weight = weight; n++; diff --git a/gst/xdgmime/xdgmime/xdgmimeglob.c b/gst/xdgmime/xdgmime/xdgmimeglob.c index ed2b73a4..47d44fe5 100644 --- a/gst/xdgmime/xdgmime/xdgmimeglob.c +++ b/gst/xdgmime/xdgmime/xdgmimeglob.c @@ -35,7 +35,8 @@ #include #include #include -#include + +#include #ifndef FALSE #define FALSE (0) @@ -362,7 +363,7 @@ _xdg_glob_hash_lookup_file_name (XdgGlobHash * glob_hash, if (n == 0) { for (list = glob_hash->full_list; list && n < n_mime_types; list = list->next) { - if (fnmatch ((const char *) list->data, file_name, 0) == 0) { + if (g_pattern_match_simple ((const char *) list->data, file_name) != 0) { mimes[n].mime = list->mime_type; mimes[n].weight = list->weight; n++; diff --git a/gst/xdgmime/xdgmime/xdgmimeicon.c b/gst/xdgmime/xdgmime/xdgmimeicon.c index 83e972b1..137a6cdd 100644 --- a/gst/xdgmime/xdgmime/xdgmimeicon.c +++ b/gst/xdgmime/xdgmime/xdgmimeicon.c @@ -34,7 +34,6 @@ #include #include #include -#include #ifndef FALSE #define FALSE (0) diff --git a/gst/xdgmime/xdgmime/xdgmimeparent.c b/gst/xdgmime/xdgmime/xdgmimeparent.c index e29fedad..daf8dd2e 100644 --- a/gst/xdgmime/xdgmime/xdgmimeparent.c +++ b/gst/xdgmime/xdgmime/xdgmimeparent.c @@ -35,7 +35,6 @@ #include #include #include -#include #ifndef FALSE #define FALSE (0) -- cgit v1.2.1