summaryrefslogtreecommitdiff
path: root/config.h.cmake
diff options
context:
space:
mode:
authorAllen Winter <allen.winter@kdab.com>2015-04-29 06:45:38 -0400
committerAllen Winter <allen.winter@kdab.com>2015-04-29 06:45:38 -0400
commit3f6eff68086b6870c95e800be1037eaca9f45872 (patch)
treecd8985621a131a1969a70516f6dbcc978570ac7d /config.h.cmake
parent8279e7263b64b009f02e8c557bfcf2c0a80fee73 (diff)
downloadlibical-git-3f6eff68086b6870c95e800be1037eaca9f45872.tar.gz
WIP: fix build on Windows with MSVC2012 now
Diffstat (limited to 'config.h.cmake')
-rw-r--r--config.h.cmake17
1 files changed, 17 insertions, 0 deletions
diff --git a/config.h.cmake b/config.h.cmake
index 78212a9e..7befde5e 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -66,9 +66,15 @@
/* Define to 1 if you have the `strcasecmp' function. */
#cmakedefine HAVE_STRCASECMP 1
+/* Define to 1 if you have the `strncasecmp' function. */
+#cmakedefine HAVE_STRNCASECMP 1
+
/* Define to 1 if you have the `stricmp' function. */
#cmakedefine HAVE_STRICMP 1
+/* Define to 1 if you have the `strnicmp' function. */
+#cmakedefine HAVE_STRNICMP 1
+
/* Define to 1 if you have the `strdup' function. */
#cmakedefine HAVE_STRDUP 1
@@ -221,6 +227,17 @@ typedef int pid_t;
#include <strings.h>
#endif
+/* strncasecmp: String compare, case independent, size limited */
+#if !defined(HAVE_STRNCASECMP)
+#if defined(HAVE_STRNICMP)
+#define strncasecmp strnicmp
+#else
+#error "No case independent string compare size limited function available"
+#endif
+#else
+#include <strings.h>
+#endif
+
/* snprintf: size limited sprintf */
#if defined(HAVE__SNPRINTF)
#define snprintf _snprintf