]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-perl/perl_back.h
Happy new year! (belated)
[openldap] / servers / slapd / back-perl / perl_back.h
index 5b99adf232e0a1786568d9d04a7abd3c2e94aeba..fe1b9a635754b332a96a1f1cbf191d3bf2de280f 100644 (file)
@@ -1,14 +1,39 @@
 /* $OpenLDAP$ */
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1999-2008 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
+ * <http://www.OpenLDAP.org/license.html>.
+ */
+
 #ifndef PERL_BACK_H
 #define PERL_BACK_H 1
 
+#include <EXTERN.h>
+#include <perl.h>
+#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
 
@@ -23,7 +48,7 @@ extern ldap_pvt_thread_mutex_t  perl_interpreter_mutex;
 # define na    PL_na
 #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
@@ -45,6 +70,6 @@ typedef struct perl_backend_instance {
 
 LDAP_END_DECL
 
-#include "external.h"
+#include "proto-perl.h"
 
-#endif
+#endif /* PERL_BACK_H */