]> git.sur5r.net Git - openldap/commitdiff
ITS#5658 hppa fixes
authorHoward Chu <hyc@openldap.org>
Tue, 23 Jun 2009 23:12:15 +0000 (23:12 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 23 Jun 2009 23:12:15 +0000 (23:12 +0000)
servers/slapd/back-perl/close.c
servers/slapd/back-perl/init.c

index 48fd480eb8ce91c1c7f3e636b7e62c247e453f0c..24263b04ae03eba956ac7d8dad7ce65969d8e25f 100644 (file)
@@ -31,6 +31,9 @@ perl_back_close(
        perl_destruct(PERL_INTERPRETER);
        perl_free(PERL_INTERPRETER);
        PERL_INTERPRETER = NULL;
+#ifdef PERL_SYS_TERM
+       PERL_SYS_TERM();
+#endif
 
        ldap_pvt_thread_mutex_destroy( &perl_interpreter_mutex );       
 
index 74e2dd052c31e37ba1603609d9a0fb9ed1b62068..c461bb2d478752e7d9a9fc17ea42ca81f4c05ec9 100644 (file)
@@ -37,6 +37,7 @@ perl_back_initialize(
 )
 {
        char *embedding[] = { "", "-e", "0" };
+       int argc = 3;
 
        bi->bi_open = NULL;
        bi->bi_config = 0;
@@ -77,9 +78,15 @@ perl_back_initialize(
        
        ldap_pvt_thread_mutex_init( &perl_interpreter_mutex );
 
+#ifdef PERL_SYS_INIT3
+       PERL_SYS_INIT3(&argc, &embedding, (char **)NULL);
+#endif
        PERL_INTERPRETER = perl_alloc();
        perl_construct(PERL_INTERPRETER);
-       perl_parse(PERL_INTERPRETER, perl_back_xs_init, 3, embedding, (char **)NULL);
+#ifdef PERL_EXIT_DESTRUCT_END
+       PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
+#endif
+       perl_parse(PERL_INTERPRETER, perl_back_xs_init, argc, embedding, (char **)NULL);
        perl_run(PERL_INTERPRETER);
        return 0;
 }