summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2011-08-09 12:07:47 +0200
committernulltoken <emeric.fermas@gmail.com>2011-08-09 22:34:54 +0200
commitd1f346931a7db577d24dca4f4ff5f81103bcc191 (patch)
tree02e3e4776bb4e7611876a338a10fbecc76ddaf35 /src/util.c
parentf6867e639a963726f381739314ea7a9d181c5aae (diff)
downloadlibgit2-d1f346931a7db577d24dca4f4ff5f81103bcc191.tar.gz
util: Add git__strcmp_cb() wrapper
We don't want direct pointers to the CRT on Windows, we may get stdcall conflicts.
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index a51cbe6d8..57274b0ce 100644
--- a/src/util.c
+++ b/src/util.c
@@ -355,3 +355,16 @@ void **git__bsearch(const void *key, void **base, size_t nmemb, int (*compar)(co
return NULL;
}
+/**
+ * A strcmp wrapper
+ *
+ * We don't want direct pointers to the CRT on Windows, we may
+ * get stdcall conflicts.
+ */
+int git__strcmp_cb(const void *a, const void *b)
+{
+ const char *stra = (const char *)a;
+ const char *strb = (const char *)b;
+
+ return strcmp(stra, strb);
+} \ No newline at end of file