From: Adam Dickmeiss Date: Wed, 17 Jul 2013 12:41:09 +0000 (+0200) Subject: Use yaz_strcmp_null, requite YAZ 4.2.63 X-Git-Tag: v1.6.33~9 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=55c22e87453d25303491f854d4d7d290f6b080bf;p=pazpar2-moved-to-github.git Use yaz_strcmp_null, requite YAZ 4.2.63 --- diff --git a/configure.ac b/configure.ac index ae8cf20..03d37cc 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_LANG(C) AC_C_INLINE -YAZ_INIT([static icu],[4.2.58]) +YAZ_INIT([static icu],[4.2.63]) if test -z "$YAZLIB"; then AC_MSG_ERROR([YAZ development libraries missing]) fi diff --git a/debian/control b/debian/control index f87fee0..e6a4c31 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: extra Maintainer: Adam Dickmeiss Build-Depends: debhelper (>= 5), autotools-dev, - libyaz4-dev (>= 4.2.58), + libyaz4-dev (>= 4.2.63), docbook-xsl, libgnutls-dev Standards-Version: 3.7.2 diff --git a/pazpar2.spec b/pazpar2.spec index 689e27f..813d457 100644 --- a/pazpar2.spec +++ b/pazpar2.spec @@ -8,11 +8,11 @@ Group: Applications/Internet Vendor: Index Data ApS Source: pazpar2-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-root -BuildRequires: libyaz4-devel >= 4.2.58 +BuildRequires: libyaz4-devel >= 4.2.63 Packager: Adam Dickmeiss URL: http://www.indexdata.com/pazpar2 Summary: pazpar2 daemon -Requires: libyaz4 >= 4.2.58 +Requires: libyaz4 >= 4.2.63 %description Pazpar2 is a high-performance, user interface-independent, data diff --git a/src/host.c b/src/host.c index 20979b6..6978dd8 100644 --- a/src/host.c +++ b/src/host.c @@ -39,26 +39,6 @@ struct database_hosts { YAZ_MUTEX mutex; }; -#if YAZ_VERSIONL > 0x4023e -#define strcmp_null(x, y) yaz_strcmp_null(x, y) -#else -#define strcmp_null(x, y) local_strcmp_null(x, y) - -static int local_strcmp_null(const char *v1, const char *v2) -{ - if (v1) - { - if (v2) - return strcmp(v1, v2); - else - return 1; - } - else if (v2) - return -1; - return 0; -} -#endif - // Create a new host structure for hostport static struct host *create_host(const char *proxy, const char *tproxy, @@ -120,8 +100,8 @@ struct host *find_host(database_hosts_t hosts, const char *url, yaz_mutex_enter(hosts->mutex); for (p = hosts->hosts; p; p = p->next) { - if (!strcmp_null(p->tproxy, tproxy) && - !strcmp_null(p->proxy, proxy)) + if (!yaz_strcmp_null(p->tproxy, tproxy) && + !yaz_strcmp_null(p->proxy, proxy)) { break; }