From 508531fb54fa4a6bdd93e3a6500489bb6f50c78c Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Sun, 8 Mar 2015 11:33:17 -0700 Subject: [PATCH] Windows --- nufxlib/samples/Exerciser.c | 9 +++++++++ nufxlib/samples/ImgConv.c | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/nufxlib/samples/Exerciser.c b/nufxlib/samples/Exerciser.c index 79229f3..15b1f50 100644 --- a/nufxlib/samples/Exerciser.c +++ b/nufxlib/samples/Exerciser.c @@ -24,6 +24,15 @@ static const char kFssep = PATH_SEP; #define kTempFile "exer-temp" +#ifndef HAVE_STRCASECMP +static int strcasecmp(const char *str1, const char *str2) +{ + while (*str1 && *str2 && toupper(*str1) == toupper(*str2)) + str1++, str2++; + return (toupper(*str1) - toupper(*str2)); +} +#endif + /* * =========================================================================== diff --git a/nufxlib/samples/ImgConv.c b/nufxlib/samples/ImgConv.c index 9eae3a7..d9624b2 100644 --- a/nufxlib/samples/ImgConv.c +++ b/nufxlib/samples/ImgConv.c @@ -16,8 +16,7 @@ #include "Common.h" #ifndef HAVE_STRCASECMP -static int -strcasecmp(const char *str1, const char *str2) +static int strcasecmp(const char *str1, const char *str2) { while (*str1 && *str2 && toupper(*str1) == toupper(*str2)) str1++, str2++;