summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2014-02-15 09:01:48 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-02-20 14:16:11 -0800
commit70a8fc999d9f0afbc793b21bbb911ecde4e24367 (patch)
tree0c5e0af16b03fdcdc71467ca6e495921485f3478 /git-compat-util.h
parentRevert "test-wildmatch: add "perf" command to compare wildmatch and fnmatch" (diff)
downloadtgif-70a8fc999d9f0afbc793b21bbb911ecde4e24367.tar.xz
stop using fnmatch (either native or compat)
Since v1.8.4 (about six months ago) wildmatch is used as default replacement for fnmatch. We have seen only one fix since so wildmatch probably has done a good job as fnmatch replacement. This concludes the fnmatch->wildmatch transition by no longer relying on fnmatch. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index cbd86c37f5..eaee4381f2 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -116,9 +116,6 @@
#include <sys/time.h>
#include <time.h>
#include <signal.h>
-#ifndef USE_WILDMATCH
-#include <fnmatch.h>
-#endif
#include <assert.h>
#include <regex.h>
#include <utime.h>
@@ -304,16 +301,7 @@ extern char *gitbasename(char *);
#include "compat/bswap.h"
-#ifdef USE_WILDMATCH
#include "wildmatch.h"
-#define FNM_PATHNAME WM_PATHNAME
-#define FNM_CASEFOLD WM_CASEFOLD
-#define FNM_NOMATCH WM_NOMATCH
-static inline int fnmatch(const char *pattern, const char *string, int flags)
-{
- return wildmatch(pattern, string, flags, NULL);
-}
-#endif
/* General helper functions */
extern void vreportf(const char *prefix, const char *err, va_list params);