From 4956f4b56e38c33e1f1dc81819112a9ab6551334 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 17 Apr 2007 20:26:58 +0000 Subject: [PATCH] Update for YAZ 3s libyaz_server.la --- Makefile.PL | 6 +++--- SimpleServer.xs | 15 ++++++++------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index 14bcc40..e340b22 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,11 +1,11 @@ use ExtUtils::MakeMaker; -## $Id: Makefile.PL,v 1.15 2007-04-17 08:06:28 adam Exp $ +## $Id: Makefile.PL,v 1.16 2007-04-17 20:26:58 adam Exp $ my $yazconf = "yaz-config"; my $yazver = `$yazconf --version`; -my $yazinc = `$yazconf --cflags threads`; -my $yazlibs = `$yazconf --libs threads`; +my $yazinc = `$yazconf --cflags servers`; +my $yazlibs = `$yazconf --libs server`; if (!$yazver || (!$yazinc && !$yazlibs)) { die qq[ ERROR: Unable to call script: yaz-config diff --git a/SimpleServer.xs b/SimpleServer.xs index cffe0eb..7146877 100644 --- a/SimpleServer.xs +++ b/SimpleServer.xs @@ -1,5 +1,5 @@ /* - * $Id: SimpleServer.xs,v 1.59 2007-04-17 08:06:47 adam Exp $ + * $Id: SimpleServer.xs,v 1.60 2007-04-17 20:26:58 adam Exp $ * ---------------------------------------------------------------------- * * Copyright (c) 2000-2004, Index Data. @@ -37,6 +37,7 @@ #include #include #include +#include #ifdef WIN32 #else #include @@ -51,7 +52,7 @@ #define sv_undef PL_sv_undef #endif -NMEM_MUTEX simpleserver_mutex; +YAZ_MUTEX simpleserver_mutex; typedef struct { SV *handle; @@ -129,7 +130,7 @@ void tst_clones(void) int simpleserver_clone(void) { #ifdef USE_ITHREADS - nmem_mutex_enter(simpleserver_mutex); + yaz_mutex_enter(simpleserver_mutex); if (1) { PerlInterpreter *current = PERL_GET_CONTEXT; @@ -145,14 +146,14 @@ int simpleserver_clone(void) { PERL_SET_CONTEXT( perl_interp ); } } - nmem_mutex_leave(simpleserver_mutex); + yaz_mutex_leave(simpleserver_mutex); #endif return 0; } void simpleserver_free(void) { - nmem_mutex_enter(simpleserver_mutex); + yaz_mutex_enter(simpleserver_mutex); if (1) { PerlInterpreter *current_interp = PERL_GET_CONTEXT; @@ -167,7 +168,7 @@ void simpleserver_free(void) { perl_free(current_interp); } } - nmem_mutex_leave(simpleserver_mutex); + yaz_mutex_leave(simpleserver_mutex); } @@ -1556,7 +1557,7 @@ start_server(...) } *argv_buf = NULL; root_perl_context = PERL_GET_CONTEXT; - nmem_mutex_create(&simpleserver_mutex); + yaz_mutex_create(&simpleserver_mutex); #if 0 /* only for debugging perl_clone .. */ tst_clones(); -- 1.7.10.4