+static bool path_matches_pattern(const char *path, const char *pattern)
+{
+#ifdef __WIN32__
+ return PathMatchSpecA(path, pattern);
+#else
+ return fnmatch(pattern, path, FNM_PATHNAME
+ #ifdef FNM_CASEFOLD
+ | FNM_CASEFOLD
+ #endif
+ ) == 0;
+#endif
+}
+