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

Re: (ITS#5658) slapo-perl symbol updates



quanah@OpenLDAP.org writes:

> Full_Name: Quanah Gibson-Mount
> Version: 2.4.11
> OS: NA
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (69.109.79.65)
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=495069
>
> Not sure how much we care about hppa architecture.

It's a general change to the libperl API and may not only affect HPPA.
You're apparently now required to call those macros, and in the future
they may have more effects.

What we did for INN was add:

#ifdef PERL_SYS_INIT3
        PERL_SYS_INIT3(&argc, &argv, &env);
#endif

before perl_alloc,

#ifdef PERL_EXIT_DESTRUCT_END
        PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
#endif

after perl_construct, and:

#ifdef PERL_SYS_TERM
   PERL_SYS_TERM();
#endif

after perl_free.  See man perlembed; with Perl 5.10, its example now
reads:

           int main(int argc, char **argv, char **env)
           {
               PERL_SYS_INIT3(&argc,&argv,&env);
               my_perl = perl_alloc();
               perl_construct(my_perl);
               PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
               perl_parse(my_perl, NULL, argc, argv, (char **)NULL);
               perl_run(my_perl);
               perl_destruct(my_perl);
               perl_free(my_perl);
               PERL_SYS_TERM();
           }

       Notice that we don't use the "env" pointer.  Normally handed to
       "perl_parse" as its final argument, "env" here is replaced by
       "NULL", which means that the current environment will be used.  The
       macros PERL_SYS_INIT3() and PERL_SYS_TERM() provide system-specific
       tune up of the C runtime environment necessary to run Perl
       interpreters; since PERL_SYS_INIT3() may change "env", it may be
       more appropriate to provide "env" as an argument to perl_parse().

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>