Blob Blame History Raw

http://svn.apache.org/viewvc?view=rev&revision=480890

--- mod_perl-2.0.3/src/modules/perl/modperl_interp.h.perl510
+++ mod_perl-2.0.3/src/modules/perl/modperl_interp.h
@@ -44,8 +44,15 @@ apr_status_t modperl_interp_cleanup(void
 #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
--- mod_perl-2.0.3/src/modules/perl/mod_perl.c.perl510
+++ mod_perl-2.0.3/src/modules/perl/mod_perl.c
@@ -584,6 +584,15 @@ static apr_status_t modperl_sys_init(voi
 
 static apr_status_t modperl_sys_term(void *data)
 {
+    /* PERL_SYS_TERM() needs 'my_perl' as of 5.9.5 */
+#ifdef USE_ITHREADS
+# if PERL_REVISION == 5 && \
+  ((PERL_VERSION == 9 && PERL_SUBVERSION > 4) || \
+   PERL_VERSION > 9)
+    modperl_cleanup_data_t *cdata = (modperl_cleanup_data_t *)data;
+    PerlInterpreter *my_perl = (PerlInterpreter *)cdata->data;
+# endif
+#endif
     MP_init_status = 0;
     MP_threads_started = 0;
     MP_post_post_config_phase = 0;