r15824 - in /trunk/libapache2-mod-perl2/debian: changelog patches/012-svn-more-perl5.10-fixes.patch patches/series

ntyni at users.alioth.debian.org ntyni at users.alioth.debian.org
Wed Feb 27 20:24:45 UTC 2008


Author: ntyni
Date: Wed Feb 27 20:24:44 2008
New Revision: 15824

URL: http://svn.debian.org/wsvn/?sc=1&rev=15824
Log:
  + 012-svn-more-perl5.10-fixes.patch: as above.

Added:
    trunk/libapache2-mod-perl2/debian/patches/012-svn-more-perl5.10-fixes.patch
Modified:
    trunk/libapache2-mod-perl2/debian/changelog
    trunk/libapache2-mod-perl2/debian/patches/series

Modified: trunk/libapache2-mod-perl2/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libapache2-mod-perl2/debian/changelog?rev=15824&op=diff
==============================================================================
--- trunk/libapache2-mod-perl2/debian/changelog (original)
+++ trunk/libapache2-mod-perl2/debian/changelog Wed Feb 27 20:24:44 2008
@@ -39,6 +39,7 @@
     + remove those Debian patches included upstream from the source package,
       as they had not been applied since 2.0.3-1.
     + 010-svn-fix-bleadperl.patch: more Perl 5.10 fixes from upstream SVN.
+    + 012-svn-more-perl5.10-fixes.patch: as above.
 
  -- Frank Lichtenheld <djpig at debian.org>  Tue, 30 Oct 2007 09:57:01 +0100
 

Added: trunk/libapache2-mod-perl2/debian/patches/012-svn-more-perl5.10-fixes.patch
URL: http://svn.debian.org/wsvn/trunk/libapache2-mod-perl2/debian/patches/012-svn-more-perl5.10-fixes.patch?rev=15824&op=file
==============================================================================
--- trunk/libapache2-mod-perl2/debian/patches/012-svn-more-perl5.10-fixes.patch (added)
+++ trunk/libapache2-mod-perl2/debian/patches/012-svn-more-perl5.10-fixes.patch Wed Feb 27 20:24:44 2008
@@ -1,0 +1,197 @@
+Even more Perl 5.10 fixes, stolen from upstream SVN r620440
+
+--- libapache2-mod-perl2.orig/src/modules/perl/mod_perl.c
++++ libapache2-mod-perl2/src/modules/perl/mod_perl.c
+@@ -840,6 +840,7 @@
+ 
+ #ifdef USE_ITHREADS
+     APR_REGISTER_OPTIONAL_FN(modperl_interp_unselect);
++    APR_REGISTER_OPTIONAL_FN(modperl_thx_interp_get);
+ #endif
+ 
+     /* for <IfDefine MODPERL2> and Apache2->define("MODPERL2") */
+--- libapache2-mod-perl2.orig/src/modules/perl/mod_perl.h
++++ libapache2-mod-perl2/src/modules/perl/mod_perl.h
+@@ -149,6 +149,7 @@
+ #define MODPERL_HOOK_REALLY_REALLY_FIRST (-20)
+ 
+ APR_DECLARE_OPTIONAL_FN(apr_status_t,modperl_interp_unselect,(void *));
++APR_DECLARE_OPTIONAL_FN(modperl_interp_t *,modperl_thx_interp_get,(PerlInterpreter *));
+ 
+ /*
+  * perl context overriding and restoration is required when
+--- libapache2-mod-perl2.orig/src/modules/perl/modperl_interp.c
++++ libapache2-mod-perl2/src/modules/perl/modperl_interp.c
+@@ -291,7 +291,7 @@
+     MpInterpIN_USE_Off(interp);
+     MpInterpPUTBACK_Off(interp);
+ 
+-    MP_THX_INTERP_SET(interp->perl, NULL);
++    modperl_thx_interp_set(interp->perl, NULL);
+ 
+     modperl_tipool_putback_data(mip->tipool, data, interp->num_requests);
+ 
+@@ -506,7 +506,7 @@
+     /* set context (THX) for this thread */
+     PERL_SET_CONTEXT(interp->perl);
+ 
+-    MP_THX_INTERP_SET(interp->perl, interp);
++    modperl_thx_interp_set(interp->perl, interp);
+ 
+     return interp;
+ }
+@@ -575,6 +575,24 @@
+     }
+ }
+ 
++#define MP_THX_INTERP_KEY "modperl2::thx_interp_key"
++modperl_interp_t *modperl_thx_interp_get(PerlInterpreter *thx)
++{
++    modperl_interp_t *interp;
++    dTHXa(thx);
++    SV **svp = hv_fetch(PL_modglobal, MP_THX_INTERP_KEY, strlen(MP_THX_INTERP_KEY), 0);
++    if (!svp) return;
++    interp = INT2PTR(modperl_interp_t *, SvIV(*svp));
++    return interp;
++}
++
++void modperl_thx_interp_set(PerlInterpreter *thx, modperl_interp_t *interp)
++{
++    dTHXa(thx);
++    hv_store(PL_modglobal, MP_THX_INTERP_KEY, strlen(MP_THX_INTERP_KEY), newSViv(PTR2IV(interp)), 0);
++    return;
++}
++
+ #else
+ 
+ void modperl_interp_init(server_rec *s, apr_pool_t *p,
+--- libapache2-mod-perl2.orig/xs/APR/Pool/APR__Pool.h
++++ libapache2-mod-perl2/xs/APR/Pool/APR__Pool.h
+@@ -42,6 +42,7 @@
+ #include "apr_optional.h"
+ static
+ APR_OPTIONAL_FN_TYPE(modperl_interp_unselect) *modperl_opt_interp_unselect;
++APR_OPTIONAL_FN_TYPE(modperl_thx_interp_get) *modperl_opt_thx_interp_get;
+ #endif
+ 
+ #define MP_APR_POOL_SV_HAS_OWNERSHIP(sv) mpxs_pool_is_custom(sv)
+@@ -95,8 +96,10 @@
+     /* make sure interpreter is not putback into the mip                \
+      * until this cleanup has run.                                      \
+      */                                                                 \
+-    if ((acct->interp = MP_THX_INTERP_GET(aTHX))) {                     \
+-        acct->interp->refcnt++;                                         \
++    if (modperl_opt_thx_interp_get) {                                   \
++        if ((acct->interp = modperl_opt_thx_interp_get(aTHX))) {        \
++            acct->interp->refcnt++;                                     \
++        }                                                               \
+     }                                                                   \
+ } STMT_END
+ 
+@@ -335,8 +338,10 @@
+     /* make sure interpreter is not putback into the mip
+      * until this cleanup has run.
+      */
+-    if ((data->interp = MP_THX_INTERP_GET(data->perl))) {
+-        data->interp->refcnt++;
++    if (modperl_opt_thx_interp_get) {
++        if ((data->interp = modperl_opt_thx_interp_get(data->perl))) {
++            data->interp->refcnt++;
++        }
+     }
+ #endif
+ 
+--- libapache2-mod-perl2.orig/xs/tables/current/ModPerl/FunctionTable.pm
++++ libapache2-mod-perl2/xs/tables/current/ModPerl/FunctionTable.pm
+@@ -5044,6 +5044,30 @@
+     'args' => []
+   },
+   {
++    'return_type' => 'modperl_interp_t *',
++    'name' => 'modperl_thx_interp_get',
++    'args' => [
++      {
++        'type' => 'PerlInterpreter *',
++        'name' => 'thx',
++      },
++    ],
++  },
++  {
++    'return_type' => 'void',
++    'name' => 'modperl_thx_interp_set',
++    'args' => [
++      {
++        'type' => 'PerlInterpreter *',
++        'name' => 'thx',
++      },
++      {
++        'type' => 'modperl_interp_t *',
++        'name' => 'interp',
++      },
++    ],
++  },
++  {
+     'return_type' => 'void',
+     'name' => 'modperl_tipool_add',
+     'args' => [
+--- libapache2-mod-perl2.orig/lib/ModPerl/WrapXS.pm
++++ libapache2-mod-perl2/lib/ModPerl/WrapXS.pm
+@@ -597,6 +597,7 @@
+ 
+     if ($module eq 'APR::Pool') {
+         print $fh "    modperl_opt_interp_unselect = APR_RETRIEVE_OPTIONAL_FN(modperl_interp_unselect);\n\n";
++        print $fh "    modperl_opt_thx_interp_get  = APR_RETRIEVE_OPTIONAL_FN(modperl_thx_interp_get);\n\n";
+     }
+ 
+     close $fh;
+--- libapache2-mod-perl2.orig/src/modules/perl/modperl_interp.h
++++ libapache2-mod-perl2/src/modules/perl/modperl_interp.h
+@@ -24,46 +24,8 @@
+ 
+ #ifdef USE_ITHREADS
+ 
+-/*
+- * HvPMROOT will never be used by Perl with PL_modglobal.
+- * so we have stolen it as a quick way to stash the interp
+- * pointer.
+- *
+- * However in 5.9.3 HvPMROOT was completely removed, so we have moved
+- * to use another struct member that's hopefully won't be used by
+- * anybody else. But if we can find a better place to store the
+- * pointer to the current mod_perl interpreter object it'd be a much
+- * cleaner solution. of course it must be really fast.
+- */
+-#ifndef HvPMROOT
+-# if PERL_REVISION == 5 && \
+-    ((PERL_VERSION == 9 && PERL_SUBVERSION > 4) || \
+-    PERL_VERSION > 9)
+-#define MP_THX_INTERP_GET(thx)                                  \
+-    (modperl_interp_t *) ((XPVMG*)SvANY(*Perl_Imodglobal_ptr(thx)))->xmg_u.xmg_magic
+-# else
+-#define MP_THX_INTERP_GET(thx)                                  \
+-      (modperl_interp_t *) ((XPVMG*)SvANY(*Perl_Imodglobal_ptr(thx)))->xmg_magic
+-# endif
+-#else
+-#define MP_THX_INTERP_GET(thx) \
+-    (modperl_interp_t *)HvPMROOT(*Perl_Imodglobal_ptr(thx))
+-#endif
+-
+-#ifndef HvPMROOT
+-# if PERL_REVISION == 5 && \
+-    ((PERL_VERSION == 9 && PERL_SUBVERSION > 4) || \
+-    PERL_VERSION > 9)
+-#define MP_THX_INTERP_SET(thx, interp)                          \
+-    ((XPVMG*)SvANY(*Perl_Imodglobal_ptr(thx)))->xmg_u.xmg_magic = (MAGIC*)interp
+-# else
+-#define MP_THX_INTERP_SET(thx, interp)                          \
+-    ((XPVMG*)SvANY(*Perl_Imodglobal_ptr(thx)))->xmg_magic = (MAGIC*)interp
+-# endif
+-#else
+-#define MP_THX_INTERP_SET(thx, interp)                          \
+-    HvPMROOT(*Perl_Imodglobal_ptr(thx)) = (PMOP*)interp
+-#endif
++modperl_interp_t *modperl_thx_interp_get(PerlInterpreter *thx);
++void modperl_thx_interp_set(PerlInterpreter *thx, modperl_interp_t *interp);
+ 
+ const char *modperl_interp_scope_desc(modperl_interp_scope_e scope);
+ 

Modified: trunk/libapache2-mod-perl2/debian/patches/series
URL: http://svn.debian.org/wsvn/trunk/libapache2-mod-perl2/debian/patches/series?rev=15824&op=diff
==============================================================================
--- trunk/libapache2-mod-perl2/debian/patches/series (original)
+++ trunk/libapache2-mod-perl2/debian/patches/series Wed Feb 27 20:24:44 2008
@@ -6,3 +6,4 @@
 009-allow-parallel-build.patch
 010-svn-fix-bleadperl.patch
 011-svn-fix-perl5.10-build.patch
+012-svn-more-perl5.10-fixes.patch 




More information about the Pkg-perl-cvs-commits mailing list