X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-perl%2Fperl_back.h;h=3ece25c9709fea4d928bcd8ea6fa0b40a3ee90ee;hb=3c7bbd05cf91687913147b617ee36226e6e7ebf2;hp=5b99adf232e0a1786568d9d04a7abd3c2e94aeba;hpb=573349a318bfab9f73999c8d7abf117ac60f8222;p=openldap
diff --git a/servers/slapd/back-perl/perl_back.h b/servers/slapd/back-perl/perl_back.h
index 5b99adf232..3ece25c970 100644
--- a/servers/slapd/back-perl/perl_back.h
+++ b/servers/slapd/back-perl/perl_back.h
@@ -1,14 +1,39 @@
/* $OpenLDAP$ */
+/* This work is part of OpenLDAP Software .
+ *
+ * Copyright 1999-2013 The OpenLDAP Foundation.
+ * Portions Copyright 1999 John C. Quillan.
+ * Portions Copyright 2002 myinternet Limited.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * .
+ */
+
#ifndef PERL_BACK_H
#define PERL_BACK_H 1
+#include
+#include
+#undef _ /* #defined by both Perl and ac/localize.h */
+#include "asperl_undefs.h"
+
+#include "portable.h"
+
+#include "slap.h"
+
LDAP_BEGIN_DECL
/*
* From Apache mod_perl: test for Perl version.
*/
-#if defined(pTHX_) || (PERL_REVISION >= 5 && PERL_VERSION >= 6)
+#if defined(pTHX_) || (PERL_REVISION > 5 || (PERL_REVISION == 5 && PERL_VERSION >= 6))
#define PERL_IS_5_6
#endif
@@ -21,9 +46,13 @@ extern ldap_pvt_thread_mutex_t perl_interpreter_mutex;
/* All the old style variables are prefixed with PL_ now */
# define errgv PL_errgv
# define na PL_na
+#else
+# define call_method(m, f) perl_call_method(m, f)
+# define eval_pv(m, f) perl_eval_pv(m, f)
+# define ERRSV GvSV(errgv)
#endif
-#ifdef HAVE_WIN32_ASPERL
+#if defined( HAVE_WIN32_ASPERL ) || defined( USE_ITHREADS )
/* pTHX is needed often now */
# define PERL_INTERPRETER my_perl
# define PERL_BACK_XS_INIT_PARAMS pTHX
@@ -32,19 +61,22 @@ extern ldap_pvt_thread_mutex_t perl_interpreter_mutex;
# define PERL_INTERPRETER perl_interpreter
# define PERL_BACK_XS_INIT_PARAMS void
# define PERL_BACK_BOOT_DYNALOADER_PARAMS CV *cv
+# define PERL_SET_CONTEXT(i)
#endif
extern PerlInterpreter *PERL_INTERPRETER;
typedef struct perl_backend_instance {
- char *pb_module_name;
+ char *pb_module_name;
+ BerVarray pb_module_path;
+ BerVarray pb_module_config;
SV *pb_obj_ref;
int pb_filter_search_results;
} PerlBackend;
LDAP_END_DECL
-#include "external.h"
+#include "proto-perl.h"
-#endif
+#endif /* PERL_BACK_H */