From 2d62c5f62ff7e2a7f1420e3cda22fb4cf0fcf8a4 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 20 Jun 2008 13:31:15 +0200 Subject: [PATCH] Avoid conditions for YAZ features.. Require YAZ 3.0.29 or later. --- configure.ac | 2 +- src/pazpar2.c | 19 ------------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/configure.ac b/configure.ac index 1e096f7..e19a7d8 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ AC_PROG_RANLIB AC_LANG(C) -YAZ_INIT([static threads],[3.0.25]) +YAZ_INIT([static threads],[3.0.29]) if test -z "$YAZLIB"; then AC_MSG_ERROR([YAZ development libraries missing]) fi diff --git a/src/pazpar2.c b/src/pazpar2.c index a570d1b..0ede6be 100644 --- a/src/pazpar2.c +++ b/src/pazpar2.c @@ -32,13 +32,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "settings.h" #include -#if YAZ_VERSIONL >= 0x03001D -/* Windows service is available in YAZ 3.0.29 or later */ -#define USE_SC 1 #include -#else -#define USE_SC 0 -#endif void child_handler(void *data) { @@ -90,9 +84,7 @@ static int tcpip_init (void) static int sc_main( -#if USE_SC yaz_sc_t s, -#endif int argc, char **argv) { int daemon = 0; @@ -110,10 +102,7 @@ static int sc_main( #endif yaz_log_init_prefix("pazpar2"); -#if YAZ_VERSIONL >= 0x03001B yaz_log_xml_errors(0, YLOG_WARN); -#endif - while ((ret = options("dDf:h:l:p:t:u:VX", argv, argc, &arg)) != -2) { @@ -189,9 +178,7 @@ static int sc_main( if (ret) return ret; /* error starting http listener */ -#if USE_SC yaz_sc_running(s); -#endif yaz_daemon("pazpar2", (global_parameters.debug_mode ? YAZ_DAEMON_DEBUG : 0) + @@ -202,25 +189,19 @@ static int sc_main( } -#if USE_SC static void sc_stop(yaz_sc_t s) { http_close_server(); } -#endif int main(int argc, char **argv) { int ret; -#if USE_SC yaz_sc_t s = yaz_sc_create("pazpar2", "Pazpar2"); ret = yaz_sc_program(s, argc, argv, sc_main, sc_stop); yaz_sc_destroy(&s); -#else - ret = sc_main(argc, argv); -#endif exit(ret); } -- 1.7.10.4