From 3f6eff68086b6870c95e800be1037eaca9f45872 Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Wed, 29 Apr 2015 06:45:38 -0400 Subject: WIP: fix build on Windows with MSVC2012 now --- config.h.cmake | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'config.h.cmake') 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 #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 +#endif + /* snprintf: size limited sprintf */ #if defined(HAVE__SNPRINTF) #define snprintf _snprintf -- cgit v1.2.1