summaryrefslogtreecommitdiffstats
path: root/gst/xdgmime
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-03-01 20:18:30 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-03-01 20:18:30 +0100
commitf957ee0aeb2902710e677b566c1ad36393ed0323 (patch)
treeb07ece8bd3462c10ed777596f68fdbd612874197 /gst/xdgmime
parente571138ef60bbe7a983e1d0a2cf86dabcf8c2e08 (diff)
downloadgst-plugins-bad-f957ee0aeb2902710e677b566c1ad36393ed0323.tar.gz
gst-plugins-bad-f957ee0aeb2902710e677b566c1ad36393ed0323.tar.bz2
gst-plugins-bad-f957ee0aeb2902710e677b566c1ad36393ed0323.zip
xdgmime: Use g_pattern_match_simple() instead of fnmatch() for Win32 compatibility
Diffstat (limited to 'gst/xdgmime')
-rw-r--r--gst/xdgmime/xdgmime/xdgmimealias.c1
-rw-r--r--gst/xdgmime/xdgmime/xdgmimecache.c3
-rw-r--r--gst/xdgmime/xdgmime/xdgmimeglob.c5
-rw-r--r--gst/xdgmime/xdgmime/xdgmimeicon.c1
-rw-r--r--gst/xdgmime/xdgmime/xdgmimeparent.c1
5 files changed, 4 insertions, 7 deletions
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 <stdio.h>
#include <assert.h>
#include <string.h>
-#include <fnmatch.h>
#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 <fcntl.h>
#include <unistd.h>
-#include <fnmatch.h>
#include <assert.h>
#include <glib.h>
@@ -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 <stdio.h>
#include <assert.h>
#include <string.h>
-#include <fnmatch.h>
+
+#include <glib.h>
#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 <stdio.h>
#include <assert.h>
#include <string.h>
-#include <fnmatch.h>
#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 <stdio.h>
#include <assert.h>
#include <string.h>
-#include <fnmatch.h>
#ifndef FALSE
#define FALSE (0)