Commit c24b15c36f41b217e98b2aaa04845002f6066b20

Edward Thomson 2018-02-28T12:20:23

win32: strncmp -> git__strncmp The win32 C library is compiled cdecl, however when configured with `STDCALL=ON`, our functions (and function pointers) will use the stdcall calling convention. You cannot set a `__stdcall` function pointer to a `__cdecl` function, so it's easier to just use our `git__strncmp` instead of sorting that mess out.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/ignore.c b/src/ignore.c
index 8c22477..9e1619c 100644
--- a/src/ignore.c
+++ b/src/ignore.c
@@ -51,7 +51,7 @@ static int does_negate_pattern(git_attr_fnmatch *rule, git_attr_fnmatch *neg)
 	if (neg->flags & GIT_ATTR_FNMATCH_ICASE)
 		cmp = git__strncasecmp;
 	else
-		cmp = strncmp;
+		cmp = git__strncmp;
 
 	/* If lengths match we need to have an exact match */
 	if (rule->length == neg->length) {