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
/*
- * $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.
#include <yaz/wrbuf.h>
#include <yaz/querytowrbuf.h>
#include <stdio.h>
+#include <yaz/mutex.h>
#ifdef WIN32
#else
#include <unistd.h>
#define sv_undef PL_sv_undef
#endif
-NMEM_MUTEX simpleserver_mutex;
+YAZ_MUTEX simpleserver_mutex;
typedef struct {
SV *handle;
int simpleserver_clone(void) {
#ifdef USE_ITHREADS
- nmem_mutex_enter(simpleserver_mutex);
+ yaz_mutex_enter(simpleserver_mutex);
if (1)
{
PerlInterpreter *current = PERL_GET_CONTEXT;
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;
perl_free(current_interp);
}
}
- nmem_mutex_leave(simpleserver_mutex);
+ yaz_mutex_leave(simpleserver_mutex);
}
}
*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();