summaryrefslogtreecommitdiff
path: root/src/diff.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-11-14 22:37:13 -0800
committerRussell Belfer <rb@github.com>2012-11-14 22:37:13 -0800
commita277345e05507dfa0a3350d47df96d37063c929f (patch)
tree47f3a36d9a613027ad447b23fd86562d1135336d /src/diff.c
parent513e794ef47363b8900816a9b141b3eae81eb83e (diff)
downloadlibgit2-a277345e05507dfa0a3350d47df96d37063c929f.tar.gz
Create internal strcmp variants for function ptrs
Using the builtin strcmp and strcasecmp as function pointers is problematic on win32. This adds internal implementations and divorces us from the platform linkage.
Diffstat (limited to 'src/diff.c')
-rw-r--r--src/diff.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/diff.c b/src/diff.c
index 6f48d72a2..d944c65e2 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -551,15 +551,15 @@ static int diff_list_init_from_iterators(
if (!old_iter->ignore_case && !new_iter->ignore_case) {
diff->opts.flags &= ~GIT_DIFF_DELTAS_ARE_ICASE;
- diff->strcomp = strcmp;
- diff->strncomp = strncmp;
+ diff->strcomp = git__strcmp;
+ diff->strncomp = git__strncmp;
diff->pfxcomp = git__prefixcmp;
diff->entrycomp = git_index_entry__cmp;
} else {
diff->opts.flags |= GIT_DIFF_DELTAS_ARE_ICASE;
- diff->strcomp = strcasecmp;
- diff->strncomp = strncasecmp;
+ diff->strcomp = git__strcasecmp;
+ diff->strncomp = git__strncasecmp;
diff->pfxcomp = git__prefixcmp_icase;
diff->entrycomp = git_index_entry__cmp_icase;
}