aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2009-02-15 20:54:20 +0000
committerWillem Jan Palenstijn2009-02-15 20:54:20 +0000
commit5c63409d3e76f15df7028e8e3569f6fb41973435 (patch)
tree8af49578b251903a8788c770b414d78466070d3d /engines
parent175de19bd167ae8ab0efe66e2300d2510b645b09 (diff)
downloadscummvm-rg350-5c63409d3e76f15df7028e8e3569f6fb41973435.tar.gz
scummvm-rg350-5c63409d3e76f15df7028e8e3569f6fb41973435.tar.bz2
scummvm-rg350-5c63409d3e76f15df7028e8e3569f6fb41973435.zip
temporarily re-include fnmatch to fix compilation and case-insensitive matching
svn-id: r38300
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/scicore/tools.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/engines/sci/scicore/tools.cpp b/engines/sci/scicore/tools.cpp
index be2ddce3f4..d1e6889b36 100644
--- a/engines/sci/scicore/tools.cpp
+++ b/engines/sci/scicore/tools.cpp
@@ -24,9 +24,15 @@
***************************************************************************/
-#define _GNU_SOURCE /* For FNM_CASEFOLD in fnmatch.h */
#include <stdlib.h>
+
+#ifndef _WIN32
+#define _GNU_SOURCE /* For FNM_CASEFOLD in fnmatch.h */
+#include <fnmatch.h>
+#endif
+
+#include "common/str.h"
#include "sci/include/engine.h"
#ifdef HAVE_SYS_TIME_H
@@ -422,8 +428,13 @@ sci_find_next(sci_dir_t *dir)
if (match->d_name[0] == '.')
continue;
+#ifdef _WIN32
+ if (Common::matchString(match->d_name, dir->mask_copy, true))
+ return match->d_name;
+#else
if (!fnmatch(dir->mask_copy, match->d_name, FNM_CASEFOLD))
return match->d_name;
+#endif
}
sci_finish_find(dir);