From b161284b288325f5eb5557152d4da21d18dc8ded Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 18 Oct 2012 13:45:32 +0200 Subject: [PATCH] Avoid strcasecmp which does not exist on Windows And also fix condition that would never be true. --- src/sortspec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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]) { -- 1.7.10.4