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++;