summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Kelman <tony@kelman.net>2015-03-05 17:11:17 -0800
committerTony Kelman <tony@kelman.net>2015-03-06 12:07:05 -0800
commit1a7ea63d228d42dc0ec1bed3a295d3dfe9392d74 (patch)
tree7c44910340376f3a9ce167eda8467287a971fce9
parent2326ea68b50756e44917e21142f22ac9baac63f6 (diff)
downloadlibgit2-1a7ea63d228d42dc0ec1bed3a295d3dfe9392d74.tar.gz
Move definitions of strcasecmp and strncasecmp to msvc-compat.h
should cut down on compiler warnings with mingw
-rw-r--r--src/win32/msvc-compat.h3
-rw-r--r--src/win32/posix.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/win32/msvc-compat.h b/src/win32/msvc-compat.h
index 4789d63df..8004bc1f8 100644
--- a/src/win32/msvc-compat.h
+++ b/src/win32/msvc-compat.h
@@ -15,6 +15,9 @@
typedef unsigned short mode_t;
typedef SSIZE_T ssize_t;
+#define strcasecmp(s1, s2) _stricmp(s1, s2)
+#define strncasecmp(s1, s2, c) _strnicmp(s1, s2, c)
+
#endif
#define GIT_STDLIB_CALL __cdecl
diff --git a/src/win32/posix.h b/src/win32/posix.h
index 9ac78430b..4bc6bfe2e 100644
--- a/src/win32/posix.h
+++ b/src/win32/posix.h
@@ -32,8 +32,6 @@ extern int p_recv(GIT_SOCKET socket, void *buffer, size_t length, int flags);
extern int p_send(GIT_SOCKET socket, const void *buffer, size_t length, int flags);
extern int p_inet_pton(int af, const char* src, void* dst);
-#define strcasecmp(s1, s2) _stricmp(s1, s2)
-#define strncasecmp(s1, s2, c) _strnicmp(s1, s2, c)
extern int p_vsnprintf(char *buffer, size_t count, const char *format, va_list argptr);
extern int p_snprintf(char *buffer, size_t count, const char *format, ...) GIT_FORMAT_PRINTF(3, 4);
extern int p_mkstemp(char *tmp_path);