[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: win32 perl backend (ITS#1827)



The first part looks fine to commit. For the 2nd part, this definitely
depends on how the local perl was configured and built. As such, the actual
test needs to be based on "perl -V" or "perl -MExtUtils::Embed" output and
detecting the relevant cppflags. The configure script already retrieves the
ccopts and adds them to the back-perl CFLAGS so I believe you should be able
to just use "#ifdef MULTIPLICITY" (or whatever combination of flags) in your
patch.

(If you're building under MSVC I'm not sure how you would set this up. I
build under Cygwin/MinGW so I have the same build environment on Windows as
Unix.)

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support

> -----Original Message-----
> From: owner-openldap-bugs@OpenLDAP.org
> [mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of
> kervin@blueprint-tech.com
> Sent: Monday, May 20, 2002 3:11 PM
> To: openldap-its@OpenLDAP.org
> Subject: win32 perl backend (ITS#1827)
>
>
> Full_Name: Kervin Pierre
> Version: CVS
> OS: win2k
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (163.118.3.50)
>
>
> i) removes XSUB.h inclusion.
>
> ii) if on the win32 platform, does an explicit interpreter
> context switch in
> functions that may be the first perl function called in their
> thread.  Without
> this OpenLDAP aborts on the first call to the perl interpreter
> from a thread
> that the interpreter was not created in.  This would be true for all perl
> installations > 5.6, built with MULTIPLICITY enabled, I believe.
>
> ? back-perl/backperl.plg
> ? back-perl/patch.txt
> Index: back-perl/add.c
> ===================================================================
> RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-perl/add.c,v
> retrieving revision 1.9
> diff -r1.9 add.c
> 38a39,42
> >
> > 	#ifdef HAVE_WIN32_ASPERL
> > 		PERL_SET_CONTEXT( PERL_INTERPRETER );
> > 	#endif
> Index: back-perl/bind.c
> ===================================================================
> RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-perl/bind.c,v
> retrieving revision 1.14
> diff -r1.14 bind.c
> 23d22
> < #include <XSUB.h>
> Index: back-perl/close.c
> ===================================================================
> RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-perl/close.c,v
> retrieving revision 1.8
> diff -r1.8 close.c
> 38a39,42
> >
> > 	#ifdef HAVE_WIN32_ASPERL
> > 		PERL_SET_CONTEXT( PERL_INTERPRETER );
> > 	#endif
> 51c55,59
> < {
> ---
> > {
> > 	#ifdef HAVE_WIN32_ASPERL
> > 		PERL_SET_CONTEXT( PERL_INTERPRETER );
> > 	#endif
> >
> Index: back-perl/compare.c
> ===================================================================
> RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-perl/compare.c,v
> retrieving revision 1.14
> diff -r1.14 compare.c
> 46a47,50
> >
> > 	#ifdef HAVE_WIN32_ASPERL
> > 		PERL_SET_CONTEXT( PERL_INTERPRETER );
> > 	#endif
> Index: back-perl/config.c
> ===================================================================
> RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-perl/config.c,v
> retrieving revision 1.13
> diff -r1.13 config.c
> 48a49,52
> > #ifdef HAVE_WIN32_ASPERL
> > 	PERL_SET_CONTEXT( PERL_INTERPRETER );
> > #endif
> >
> Index: back-perl/delete.c
> ===================================================================
> RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-perl/delete.c,v
> retrieving revision 1.11
> diff -r1.11 delete.c
> 39a40,43
> >
> > 	#ifdef HAVE_WIN32_ASPERL
> > 		PERL_SET_CONTEXT( PERL_INTERPRETER );
> > 	#endif
> Index: back-perl/init.c
> ===================================================================
> RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-perl/init.c,v
> retrieving revision 1.26
> diff -r1.26 init.c
> 23d22
> < #include <XSUB.h>
> 179c178
> < perl_back_xs_init()
> ---
> > perl_back_xs_init(PERL_BACK_XS_INIT_PARAMS)
> Index: back-perl/modrdn.c
> ===================================================================
> RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-perl/modrdn.c,v
> retrieving revision 1.13
> diff -r1.13 modrdn.c
> 57a58,61
> >
> > 	#ifdef HAVE_WIN32_ASPERL
> > 		PERL_SET_CONTEXT( PERL_INTERPRETER );
> > 	#endif
> Index: back-perl/search.c
> ===================================================================
> RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-perl/search.c,v
> retrieving revision 1.17
> diff -r1.17 search.c
> 57a58,61
> >
> > 	#ifdef HAVE_WIN32_ASPERL
> > 		PERL_SET_CONTEXT( PERL_INTERPRETER );
> > 	#endif
>