From: Adam Dickmeiss Date: Thu, 18 Oct 2012 11:45:32 +0000 (+0200) Subject: Avoid strcasecmp which does not exist on Windows X-Git-Tag: v4.2.42~1 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=b161284b288325f5eb5557152d4da21d18dc8ded;p=yaz-moved-to-github.git Avoid strcasecmp which does not exist on Windows And also fix condition that would never be true. --- diff --git a/src/sortspec.c b/src/sortspec.c index e09895b..7f272f5 100644 --- a/src/sortspec.c +++ b/src/sortspec.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -417,8 +418,8 @@ int yaz_solr_sortkeys_to_sort_spec(const char *solr_sortkeys, WRBUF w) if (num_arg != 2) return -1; - if (!strcasecmp(arg[1],"asc") && - !strcasecmp(arg[1],"desc")) + if (yaz_matchstr(arg[1], "asc") && + yaz_matchstr(arg[1], "desc")) return -1; if (arg[1][0]) {