From 573349a318bfab9f73999c8d7abf117ac60f8222 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 13 Mar 2003 01:58:26 +0000 Subject: [PATCH] ITS#2356 - support Perl newer than 5.6 --- servers/slapd/back-perl/init.c | 2 +- servers/slapd/back-perl/perl_back.h | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/servers/slapd/back-perl/init.c b/servers/slapd/back-perl/init.c index 8cac0819e0..648ae715a9 100644 --- a/servers/slapd/back-perl/init.c +++ b/servers/slapd/back-perl/init.c @@ -175,7 +175,7 @@ perl_back_db_open( static void -perl_back_xs_init() +perl_back_xs_init(PERL_BACK_XS_INIT_PARAMS) { char *file = __FILE__; dXSUB_SYS; diff --git a/servers/slapd/back-perl/perl_back.h b/servers/slapd/back-perl/perl_back.h index 232364492a..5b99adf232 100644 --- a/servers/slapd/back-perl/perl_back.h +++ b/servers/slapd/back-perl/perl_back.h @@ -5,28 +5,25 @@ LDAP_BEGIN_DECL /* - * From Apache mod_perl: test for Perl version.[ja + * From Apache mod_perl: test for Perl version. */ -#ifdef pTHX_ + +#if defined(pTHX_) || (PERL_REVISION >= 5 && PERL_VERSION >= 6) #define PERL_IS_5_6 #endif #define EVAL_BUF_SIZE 500 -#ifdef pTHX_ -#define PERL_IS_5_6 -#endif - extern ldap_pvt_thread_mutex_t perl_interpreter_mutex; -#ifdef HAVE_WIN32_ASPERL +#ifdef PERL_IS_5_6 /* We should be using the PL_errgv, I think */ /* All the old style variables are prefixed with PL_ now */ # define errgv PL_errgv # define na PL_na #endif -#ifdef HAVE_WIN32_ASPERL +#ifdef HAVE_WIN32_ASPERL /* pTHX is needed often now */ # define PERL_INTERPRETER my_perl # define PERL_BACK_XS_INIT_PARAMS pTHX -- 2.39.5