summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2021-05-03 18:48:24 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-05-03 18:48:24 +0100
commitde296b13c80b3d46b39265122b8da01cddfa5a6d (patch)
treeb38d9781b34a97da6e81a2c1cbe4dcd76d3d8a4c /src
parent84e907ef7df6306eddf866bad9a500dde856117e (diff)
Eina: use eina_fnmatch() instead of fnmatch()
Reviewers: raster Reviewed By: raster Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12262
Diffstat (limited to 'src')
-rw-r--r--src/bin/edje/edje_external_inspector.c5
-rw-r--r--src/bin/edje/edje_inspector.c3
-rw-r--r--src/lib/ecore_x/ecore_x_vsync.c3
-rw-r--r--src/lib/eet/eet_lib.c3
-rw-r--r--src/lib/efreet/efreet_mime.c5
-rw-r--r--src/lib/efreet/efreet_utils.c3
-rw-r--r--src/lib/eina/eina_log.c6
-rw-r--r--src/lib/elementary/Efl_Ui.h1
-rw-r--r--src/lib/elementary/Elementary.h1
-rw-r--r--src/lib/elementary/elm_gengrid.c18
-rw-r--r--src/lib/elementary/elm_genlist.c20
-rw-r--r--src/lib/embryo/embryo_str.c3
-rw-r--r--src/lib/eo/eo_base_class.c3
-rw-r--r--src/lib/evas/canvas/evas_font_dir.c10
-rw-r--r--src/lib/evas/file/evas_path.c10
15 files changed, 37 insertions, 57 deletions
diff --git a/src/bin/edje/edje_external_inspector.c b/src/bin/edje/edje_external_inspector.c
index 718c02fc74..07940cb11a 100644
--- a/src/bin/edje/edje_external_inspector.c
+++ b/src/bin/edje/edje_external_inspector.c
@@ -3,7 +3,6 @@
3#endif 3#endif
4 4
5#include <locale.h> 5#include <locale.h>
6#include <fnmatch.h>
7 6
8#include <Ecore.h> 7#include <Ecore.h>
9#include <Ecore_Getopt.h> 8#include <Ecore_Getopt.h>
@@ -56,7 +55,7 @@ module_matches(const char *name)
56 if (!module_patterns) return EINA_TRUE; 55 if (!module_patterns) return EINA_TRUE;
57 56
58 for (itr = module_patterns; *itr != NULL; itr++) 57 for (itr = module_patterns; *itr != NULL; itr++)
59 if (fnmatch(*itr, name, 0) == 0) return EINA_TRUE; 58 if (eina_fnmatch(*itr, name, 0)) return EINA_TRUE;
60 59
61 return EINA_FALSE; 60 return EINA_FALSE;
62} 61}
@@ -65,7 +64,7 @@ static inline Eina_Bool
65type_matches(const char *name) 64type_matches(const char *name)
66{ 65{
67 if (!type_glob) return EINA_TRUE; 66 if (!type_glob) return EINA_TRUE;
68 return fnmatch(type_glob, name, 0) == 0; 67 return eina_fnmatch(type_glob, name, 0);
69} 68}
70 69
71static int 70static int
diff --git a/src/bin/edje/edje_inspector.c b/src/bin/edje/edje_inspector.c
index 25024cee73..69953502a3 100644
--- a/src/bin/edje/edje_inspector.c
+++ b/src/bin/edje/edje_inspector.c
@@ -3,7 +3,6 @@
3#endif 3#endif
4 4
5#include <locale.h> 5#include <locale.h>
6#include <fnmatch.h>
7#include <unistd.h> 6#include <unistd.h>
8#include <errno.h> 7#include <errno.h>
9 8
@@ -101,7 +100,7 @@ static inline Eina_Bool
101matches(const char *name, const char *pattern) 100matches(const char *name, const char *pattern)
102{ 101{
103 if (!pattern) return EINA_TRUE; 102 if (!pattern) return EINA_TRUE;
104 return fnmatch(pattern, name, 0) == 0; 103 return eina_fnmatch(pattern, name, 0);
105} 104}
106 105
107static void 106static void
diff --git a/src/lib/ecore_x/ecore_x_vsync.c b/src/lib/ecore_x/ecore_x_vsync.c
index 5ad828d0fe..1014542a6a 100644
--- a/src/lib/ecore_x/ecore_x_vsync.c
+++ b/src/lib/ecore_x/ecore_x_vsync.c
@@ -15,7 +15,6 @@
15#include <sys/stat.h> 15#include <sys/stat.h>
16#include <sys/select.h> 16#include <sys/select.h>
17#include <fcntl.h> 17#include <fcntl.h>
18#include <fnmatch.h>
19 18
20#ifdef HAVE_PRCTL 19#ifdef HAVE_PRCTL
21# include <sys/prctl.h> 20# include <sys/prctl.h>
@@ -648,7 +647,7 @@ glob_match(const char *glob, const char *str)
648{ 647{
649 if (!glob) return EINA_TRUE; 648 if (!glob) return EINA_TRUE;
650 if (!str) return EINA_FALSE; 649 if (!str) return EINA_FALSE;
651 if (!fnmatch(glob, str, 0)) return EINA_TRUE; 650 if (eina_fnmatch(glob, str, 0)) return EINA_TRUE;
652 return EINA_FALSE; 651 return EINA_FALSE;
653} 652}
654 653
diff --git a/src/lib/eet/eet_lib.c b/src/lib/eet/eet_lib.c
index e1216e6108..1aa2a1c9bb 100644
--- a/src/lib/eet/eet_lib.c
+++ b/src/lib/eet/eet_lib.c
@@ -9,7 +9,6 @@
9#include <time.h> 9#include <time.h>
10#include <string.h> 10#include <string.h>
11#include <unistd.h> 11#include <unistd.h>
12#include <fnmatch.h>
13#include <fcntl.h> 12#include <fcntl.h>
14 13
15#include <Eina.h> 14#include <Eina.h>
@@ -2607,7 +2606,7 @@ eet_list(Eet_File *ef,
2607 * check for * explicitly, because on some systems, * isn't well 2606 * check for * explicitly, because on some systems, * isn't well
2608 * supported 2607 * supported
2609 */ 2608 */
2610 if ((!glob) || !fnmatch(glob, efn->name, 0)) 2609 if ((!glob) || eina_fnmatch(glob, efn->name, 0))
2611 { 2610 {
2612 /* add it to our list */ 2611 /* add it to our list */
2613 list_count++; 2612 list_count++;
diff --git a/src/lib/efreet/efreet_mime.c b/src/lib/efreet/efreet_mime.c
index d94894ff71..9e3e7cb404 100644
--- a/src/lib/efreet/efreet_mime.c
+++ b/src/lib/efreet/efreet_mime.c
@@ -6,7 +6,6 @@
6#include <sys/stat.h> 6#include <sys/stat.h>
7#include <fcntl.h> 7#include <fcntl.h>
8#include <unistd.h> 8#include <unistd.h>
9#include <fnmatch.h>
10 9
11#include <Ecore.h> 10#include <Ecore.h>
12#include <Ecore_File.h> 11#include <Ecore_File.h>
@@ -1237,7 +1236,7 @@ efreet_mime_glob_match(const char *str, const char *glob)
1237 if (str[0] == 0) return 1; 1236 if (str[0] == 0) return 1;
1238 return 0; 1237 return 0;
1239 } 1238 }
1240 if (!fnmatch(glob, str, 0)) return 1; 1239 if (eina_fnmatch(glob, str, 0)) return 1;
1241 return 0; 1240 return 0;
1242} 1241}
1243 1242
@@ -1263,7 +1262,7 @@ efreet_mime_glob_case_match(char *str, const char *glob)
1263 tglob = alloca(strlen(glob) + 1); 1262 tglob = alloca(strlen(glob) + 1);
1264 for (tp = tglob, p = glob; *p; p++, tp++) *tp = tolower(*p); 1263 for (tp = tglob, p = glob; *p; p++, tp++) *tp = tolower(*p);
1265 *tp = 0; 1264 *tp = 0;
1266 if (!fnmatch(str, tglob, 0)) return 1; 1265 if (eina_fnmatch(str, tglob, 0)) return 1;
1267 return 0; 1266 return 0;
1268} 1267}
1269 1268
diff --git a/src/lib/efreet/efreet_utils.c b/src/lib/efreet/efreet_utils.c
index e1cafaaf89..14fc011cd6 100644
--- a/src/lib/efreet/efreet_utils.c
+++ b/src/lib/efreet/efreet_utils.c
@@ -4,7 +4,6 @@
4 4
5/* TODO: add no_display check, as we might want only displayable items */ 5/* TODO: add no_display check, as we might want only displayable items */
6 6
7#include <fnmatch.h>
8#include <ctype.h> 7#include <ctype.h>
9 8
10#include <Ecore_File.h> 9#include <Ecore_File.h>
@@ -450,7 +449,7 @@ efreet_util_glob_match(const char *str, const char *glob)
450 return 0; 449 return 0;
451 } 450 }
452 if (!strcmp(glob, "*")) return 1; 451 if (!strcmp(glob, "*")) return 1;
453 if (!fnmatch(glob, str, 0)) return 1; 452 if (eina_fnmatch(glob, str, 0)) return 1;
454 return 0; 453 return 0;
455} 454}
456 455
diff --git a/src/lib/eina/eina_log.c b/src/lib/eina/eina_log.c
index bd362fd9a2..4a841a746e 100644
--- a/src/lib/eina/eina_log.c
+++ b/src/lib/eina/eina_log.c
@@ -25,7 +25,6 @@
25#include <string.h> 25#include <string.h>
26#include <stdlib.h> 26#include <stdlib.h>
27#include <unistd.h> 27#include <unistd.h>
28#include <fnmatch.h>
29#include <assert.h> 28#include <assert.h>
30#include <errno.h> 29#include <errno.h>
31 30
@@ -45,6 +44,7 @@
45 44
46#include "eina_config.h" 45#include "eina_config.h"
47#include "eina_private.h" 46#include "eina_private.h"
47#include "eina_fnmatch.h"
48#include "eina_inlist.h" 48#include "eina_inlist.h"
49#include "eina_lock.h" 49#include "eina_lock.h"
50#include "eina_thread.h" 50#include "eina_thread.h"
@@ -1280,7 +1280,7 @@ finish_register:
1280 { 1280 {
1281 EINA_INLIST_FOREACH(_glob_list, pending) 1281 EINA_INLIST_FOREACH(_glob_list, pending)
1282 { 1282 {
1283 if (!fnmatch(pending->name, name, 0)) 1283 if (eina_fnmatch(pending->name, name, 0))
1284 { 1284 {
1285 _log_domains[i].level = pending->level; 1285 _log_domains[i].level = pending->level;
1286 break; 1286 break;
@@ -1996,7 +1996,7 @@ eina_log_domain_level_get(const char *domain_name)
1996 1996
1997 EINA_INLIST_FOREACH(_glob_list, pending) 1997 EINA_INLIST_FOREACH(_glob_list, pending)
1998 { 1998 {
1999 if (!fnmatch(pending->name, domain_name, 0)) 1999 if (eina_fnmatch(pending->name, domain_name, 0))
2000 return pending->level; 2000 return pending->level;
2001 } 2001 }
2002 2002
diff --git a/src/lib/elementary/Efl_Ui.h b/src/lib/elementary/Efl_Ui.h
index 3a64e9fdb0..3178aa9be6 100644
--- a/src/lib/elementary/Efl_Ui.h
+++ b/src/lib/elementary/Efl_Ui.h
@@ -14,7 +14,6 @@
14#include <sys/time.h> 14#include <sys/time.h>
15#include <sys/param.h> 15#include <sys/param.h>
16#include <math.h> 16#include <math.h>
17#include <fnmatch.h>
18#include <limits.h> 17#include <limits.h>
19#include <ctype.h> 18#include <ctype.h>
20#include <time.h> 19#include <time.h>
diff --git a/src/lib/elementary/Elementary.h b/src/lib/elementary/Elementary.h
index 8e8c198829..b26272c128 100644
--- a/src/lib/elementary/Elementary.h
+++ b/src/lib/elementary/Elementary.h
@@ -20,7 +20,6 @@
20#include <sys/time.h> 20#include <sys/time.h>
21#include <sys/param.h> 21#include <sys/param.h>
22#include <math.h> 22#include <math.h>
23#include <fnmatch.h>
24#include <limits.h> 23#include <limits.h>
25#include <ctype.h> 24#include <ctype.h>
26#include <time.h> 25#include <time.h>
diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c
index 132b7aa14f..07e9a971ec 100644
--- a/src/lib/elementary/elm_gengrid.c
+++ b/src/lib/elementary/elm_gengrid.c
@@ -418,12 +418,10 @@ _elm_gengrid_search_by_text_item_get(Eo *obj EINA_UNUSED,
418 if (!pattern) return NULL; 418 if (!pattern) return NULL;
419 if (!sd->items) return NULL; 419 if (!sd->items) return NULL;
420 420
421 if (flags & ELM_GLOB_MATCH_NO_ESCAPE) fnflags |= FNM_NOESCAPE; 421 if (flags & ELM_GLOB_MATCH_NO_ESCAPE) fnflags |= EINA_FNMATCH_NOESCAPE;
422 if (flags & ELM_GLOB_MATCH_PATH) fnflags |= FNM_PATHNAME; 422 if (flags & ELM_GLOB_MATCH_PATH) fnflags |= EINA_FNMATCH_PATHNAME;
423 if (flags & ELM_GLOB_MATCH_PERIOD) fnflags |= FNM_PERIOD; 423 if (flags & ELM_GLOB_MATCH_PERIOD) fnflags |= EINA_FNMATCH_PERIOD;
424#ifdef FNM_CASEFOLD 424 if (flags & ELM_GLOB_MATCH_NOCASE) fnflags |= EINA_FNMATCH_CASEFOLD;
425 if (flags & ELM_GLOB_MATCH_NOCASE) fnflags |= FNM_CASEFOLD;
426#endif
427 425
428 ELM_GENGRID_ITEM_DATA_GET(eo_item_to_search_from, item_to_search_from); 426 ELM_GENGRID_ITEM_DATA_GET(eo_item_to_search_from, item_to_search_from);
429 start = (item_to_search_from) ? 427 start = (item_to_search_from) ?
@@ -435,7 +433,7 @@ _elm_gengrid_search_by_text_item_get(Eo *obj EINA_UNUSED,
435 str = it->itc->func.text_get((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), 433 str = it->itc->func.text_get((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)),
436 WIDGET(it), part_name ? part_name : "elm.text"); 434 WIDGET(it), part_name ? part_name : "elm.text");
437 if (!str) continue; 435 if (!str) continue;
438 if (!fnmatch(pattern, str, fnflags)) 436 if (eina_fnmatch(pattern, str, fnflags))
439 { 437 {
440 free(str); 438 free(str);
441 return EO_OBJ(it); 439 return EO_OBJ(it);
@@ -1021,7 +1019,7 @@ _item_text_realize(Elm_Gen_Item *it,
1021 (edje_object_data_get(target, "texts")); 1019 (edje_object_data_get(target, "texts"));
1022 EINA_LIST_FOREACH(*source, l, key) 1020 EINA_LIST_FOREACH(*source, l, key)
1023 { 1021 {
1024 if (parts && fnmatch(parts, key, FNM_PERIOD)) continue; 1022 if (parts && !eina_fnmatch(parts, key, EINA_FNMATCH_PERIOD)) continue;
1025 1023
1026 s = it->itc->func.text_get 1024 s = it->itc->func.text_get
1027 ((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it), key); 1025 ((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it), key);
@@ -1070,7 +1068,7 @@ _item_content_realize(Elm_Gen_Item *it,
1070 1068
1071 EINA_LIST_FREE(source, key) 1069 EINA_LIST_FREE(source, key)
1072 { 1070 {
1073 if (parts && fnmatch(parts, key, FNM_PERIOD)) 1071 if (parts && !eina_fnmatch(parts, key, EINA_FNMATCH_PERIOD))
1074 continue; 1072 continue;
1075 1073
1076 Evas_Object *old = edje_object_part_swallow_get(target, key); 1074 Evas_Object *old = edje_object_part_swallow_get(target, key);
@@ -1137,7 +1135,7 @@ _item_state_realize(Elm_Gen_Item *it, Evas_Object *target, const char *parts)
1137 src = elm_widget_stringlist_get(edje_object_data_get(target, "states")); 1135 src = elm_widget_stringlist_get(edje_object_data_get(target, "states"));
1138 EINA_LIST_FREE(src, key) 1136 EINA_LIST_FREE(src, key)
1139 { 1137 {
1140 if (parts && fnmatch(parts, key, FNM_PERIOD)) continue; 1138 if (parts && !eina_fnmatch(parts, key, EINA_FNMATCH_PERIOD)) continue;
1141 1139
1142 Eina_Bool on = it->itc->func.state_get 1140 Eina_Bool on = it->itc->func.state_get
1143 ((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it), key); 1141 ((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it), key);
diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index 78b3134138..d7ed1e52e0 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -2,8 +2,6 @@
2# include "elementary_config.h" 2# include "elementary_config.h"
3#endif 3#endif
4 4
5#include <fnmatch.h>
6
7#define EFL_ACCESS_OBJECT_PROTECTED 5#define EFL_ACCESS_OBJECT_PROTECTED
8#define EFL_ACCESS_SELECTION_PROTECTED 6#define EFL_ACCESS_SELECTION_PROTECTED
9#define EFL_ACCESS_WIDGET_ACTION_PROTECTED 7#define EFL_ACCESS_WIDGET_ACTION_PROTECTED
@@ -347,7 +345,7 @@ _item_text_realize(Elm_Gen_Item *it,
347 (edje_object_data_get(target, "texts")); 345 (edje_object_data_get(target, "texts"));
348 EINA_LIST_FOREACH(*source, l, key) 346 EINA_LIST_FOREACH(*source, l, key)
349 { 347 {
350 if (parts && fnmatch(parts, key, FNM_PERIOD)) continue; 348 if (parts && !eina_fnmatch(parts, key, EINA_FNMATCH_PERIOD)) continue;
351 349
352 s = it->itc->func.text_get 350 s = it->itc->func.text_get
353 ((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it), key); 351 ((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it), key);
@@ -423,7 +421,7 @@ _item_content_realize(Elm_Gen_Item *it,
423 421
424 EINA_LIST_FREE(source, key) 422 EINA_LIST_FREE(source, key)
425 { 423 {
426 if (parts && fnmatch(parts, key, FNM_PERIOD)) 424 if (parts && !eina_fnmatch(parts, key, EINA_FNMATCH_PERIOD))
427 continue; 425 continue;
428 426
429 Evas_Object *old = NULL; 427 Evas_Object *old = NULL;
@@ -505,7 +503,7 @@ _item_state_realize(Elm_Gen_Item *it, Evas_Object *target, const char *parts)
505 src = elm_widget_stringlist_get(edje_object_data_get(target, "states")); 503 src = elm_widget_stringlist_get(edje_object_data_get(target, "states"));
506 EINA_LIST_FREE(src, key) 504 EINA_LIST_FREE(src, key)
507 { 505 {
508 if (parts && fnmatch(parts, key, FNM_PERIOD)) continue; 506 if (parts && !eina_fnmatch(parts, key, EINA_FNMATCH_PERIOD)) continue;
509 507
510 Eina_Bool on = it->itc->func.state_get 508 Eina_Bool on = it->itc->func.state_get
511 ((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it), key); 509 ((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it), key);
@@ -8746,12 +8744,10 @@ _elm_genlist_search_by_text_item_get(Eo *obj EINA_UNUSED,
8746 if (!pattern) return NULL; 8744 if (!pattern) return NULL;
8747 if (!sd->items) return NULL; 8745 if (!sd->items) return NULL;
8748 8746
8749 if (flags & ELM_GLOB_MATCH_NO_ESCAPE) fnflags |= FNM_NOESCAPE; 8747 if (flags & ELM_GLOB_MATCH_NO_ESCAPE) fnflags |= EINA_FNMATCH_NOESCAPE;
8750 if (flags & ELM_GLOB_MATCH_PATH) fnflags |= FNM_PATHNAME; 8748 if (flags & ELM_GLOB_MATCH_PATH) fnflags |= EINA_FNMATCH_PATHNAME;
8751 if (flags & ELM_GLOB_MATCH_PERIOD) fnflags |= FNM_PERIOD; 8749 if (flags & ELM_GLOB_MATCH_PERIOD) fnflags |= EINA_FNMATCH_PERIOD;
8752#ifdef FNM_CASEFOLD 8750 if (flags & ELM_GLOB_MATCH_NOCASE) fnflags |= EINA_FNMATCH_CASEFOLD;
8753 if (flags & ELM_GLOB_MATCH_NOCASE) fnflags |= FNM_CASEFOLD;
8754#endif
8755 8751
8756 start = (item_to_search_from) ? 8752 start = (item_to_search_from) ?
8757 EINA_INLIST_GET((Elm_Gen_Item *)efl_data_scope_get(item_to_search_from, ELM_GENLIST_ITEM_CLASS)) : 8753 EINA_INLIST_GET((Elm_Gen_Item *)efl_data_scope_get(item_to_search_from, ELM_GENLIST_ITEM_CLASS)) :
@@ -8761,7 +8757,7 @@ _elm_genlist_search_by_text_item_get(Eo *obj EINA_UNUSED,
8761 if (!it->itc->func.text_get) continue; 8757 if (!it->itc->func.text_get) continue;
8762 str = it->itc->func.text_get((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it), part_name); 8758 str = it->itc->func.text_get((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it), part_name);
8763 if (!str) continue; 8759 if (!str) continue;
8764 if (!fnmatch(pattern, str, fnflags)) 8760 if (eina_fnmatch(pattern, str, fnflags))
8765 { 8761 {
8766 free(str); 8762 free(str);
8767 return EO_OBJ(it); 8763 return EO_OBJ(it);
diff --git a/src/lib/embryo/embryo_str.c b/src/lib/embryo/embryo_str.c
index 6fafa83db0..3b7dd6fd68 100644
--- a/src/lib/embryo/embryo_str.c
+++ b/src/lib/embryo/embryo_str.c
@@ -14,7 +14,6 @@
14#include <stdlib.h> 14#include <stdlib.h>
15#include <stdio.h> 15#include <stdio.h>
16#include <string.h> 16#include <string.h>
17#include <fnmatch.h>
18 17
19#include <Eina.h> 18#include <Eina.h>
20 19
@@ -61,7 +60,7 @@ _embryo_str_fnmatch(Embryo_Program *ep, Embryo_Cell *params)
61 STRGET(ep, s1, params[1]); 60 STRGET(ep, s1, params[1]);
62 STRGET(ep, s2, params[2]); 61 STRGET(ep, s2, params[2]);
63 if ((!s1) || (!s2)) return -1; 62 if ((!s1) || (!s2)) return -1;
64 return (Embryo_Cell)fnmatch(s1, s2, 0); 63 return (Embryo_Cell)!eina_fnmatch(s1, s2, 0);
65} 64}
66 65
67static Embryo_Cell 66static Embryo_Cell
diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index 546b5d3999..db721f0597 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -3,7 +3,6 @@
3#endif 3#endif
4 4
5#include <Eina.h> 5#include <Eina.h>
6#include <fnmatch.h>
7 6
8#include <Eo.h> 7#include <Eo.h>
9 8
@@ -545,7 +544,7 @@ _name_match(const char *match, Eina_Bool is_glob, const char *str)
545 // if match string is "*" special case it and match 544 // if match string is "*" special case it and match
546 if ((match[0] == '*') && (match[1] == 0)) return EINA_TRUE; 545 if ((match[0] == '*') && (match[1] == 0)) return EINA_TRUE;
547 // actual compare 546 // actual compare
548 if (!fnmatch(match, str, 0)) return EINA_TRUE; 547 if (eina_fnmatch(match, str, 0)) return EINA_TRUE;
549 } 548 }
550 else 549 else
551 { 550 {
diff --git a/src/lib/evas/canvas/evas_font_dir.c b/src/lib/evas/canvas/evas_font_dir.c
index 2d98916ee6..fa6c9591a9 100644
--- a/src/lib/evas/canvas/evas_font_dir.c
+++ b/src/lib/evas/canvas/evas_font_dir.c
@@ -65,7 +65,6 @@ static FcConfig *fc_config = NULL;
65 65
66/* FIXME move these helper function to eina_file or eina_path */ 66/* FIXME move these helper function to eina_file or eina_path */
67/* get the casefold feature! */ 67/* get the casefold feature! */
68#include <fnmatch.h>
69#include <unistd.h> 68#include <unistd.h>
70#include <sys/param.h> 69#include <sys/param.h>
71int 70int
@@ -99,11 +98,10 @@ _file_path_list(char *path, const char *match, int match_case)
99 Eina_List *files = NULL; 98 Eina_List *files = NULL;
100 int flags; 99 int flags;
101 100
102 flags = FNM_PATHNAME; 101 flags = EINA_FNMATCH_PATHNAME;
103#ifdef FNM_CASEFOLD
104 if (!match_case) 102 if (!match_case)
105 flags |= FNM_CASEFOLD; 103 flags |= EINA_FNMATCH_CASEFOLD;
106#elif defined FNM_IGNORECASE 104#if defined FNM_IGNORECASE
107 if (!match_case) 105 if (!match_case)
108 flags |= FNM_IGNORECASE; 106 flags |= FNM_IGNORECASE;
109#else 107#else
@@ -115,7 +113,7 @@ _file_path_list(char *path, const char *match, int match_case)
115 { 113 {
116 if (match) 114 if (match)
117 { 115 {
118 if (fnmatch(match, info->path + info->name_start, flags) == 0) 116 if (eina_fnmatch(match, info->path + info->name_start, flags))
119 files = eina_list_append(files, strdup(info->path + info->name_start)); 117 files = eina_list_append(files, strdup(info->path + info->name_start));
120 } 118 }
121 else 119 else
diff --git a/src/lib/evas/file/evas_path.c b/src/lib/evas/file/evas_path.c
index ef3d439018..68570a1c8d 100644
--- a/src/lib/evas/file/evas_path.c
+++ b/src/lib/evas/file/evas_path.c
@@ -12,7 +12,6 @@
12#include <sys/types.h> 12#include <sys/types.h>
13#include <sys/stat.h> 13#include <sys/stat.h>
14/* get the casefold feature! */ 14/* get the casefold feature! */
15#include <fnmatch.h>
16#include <unistd.h> 15#include <unistd.h>
17#include <sys/param.h> 16#include <sys/param.h>
18 17
@@ -98,11 +97,10 @@ evas_file_path_list(char *path, const char *match, int match_case)
98 Eina_List *files = NULL; 97 Eina_List *files = NULL;
99 int flags; 98 int flags;
100 99
101 flags = FNM_PATHNAME; 100 flags = EINA_FNMATCH_PATHNAME;
102#ifdef FNM_CASEFOLD
103 if (!match_case) 101 if (!match_case)
104 flags |= FNM_CASEFOLD; 102 flags |= EINA_FNMATCH_CASEFOLD;
105#elif defined FNM_IGNORECASE 103#if defined FNM_IGNORECASE
106 if (!match_case) 104 if (!match_case)
107 flags |= FNM_IGNORECASE; 105 flags |= FNM_IGNORECASE;
108#else 106#else
@@ -114,7 +112,7 @@ evas_file_path_list(char *path, const char *match, int match_case)
114 { 112 {
115 if (match) 113 if (match)
116 { 114 {
117 if (fnmatch(match, info->path + info->name_start, flags) == 0) 115 if (eina_fnmatch(match, info->path + info->name_start, flags))
118 files = eina_list_append(files, strdup(info->path + info->name_start)); 116 files = eina_list_append(files, strdup(info->path + info->name_start));
119 } 117 }
120 else 118 else