temporarily re-include fnmatch to fix compilation and case-insensitive matching
svn-id: r38300
This commit is contained in:
parent
175de19bd1
commit
5c63409d3e
1 changed files with 12 additions and 1 deletions
|
@ -24,9 +24,15 @@
|
||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#define _GNU_SOURCE /* For FNM_CASEFOLD in fnmatch.h */
|
|
||||||
|
|
||||||
#include <stdlib.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"
|
#include "sci/include/engine.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_TIME_H
|
#ifdef HAVE_SYS_TIME_H
|
||||||
|
@ -422,8 +428,13 @@ sci_find_next(sci_dir_t *dir)
|
||||||
if (match->d_name[0] == '.')
|
if (match->d_name[0] == '.')
|
||||||
continue;
|
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))
|
if (!fnmatch(dir->mask_copy, match->d_name, FNM_CASEFOLD))
|
||||||
return match->d_name;
|
return match->d_name;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
sci_finish_find(dir);
|
sci_finish_find(dir);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue