perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From steve...@apache.org
Subject svn commit: r1868115 - /perl/modperl/trunk/src/modules/perl/modperl_env.c
Date Tue, 08 Oct 2019 07:41:31 GMT
Author: stevehay
Date: Tue Oct  8 07:41:31 2019
New Revision: 1868115

URL: http://svn.apache.org/viewvc?rev=1868115&view=rev
Log:
Restore build with perl 5.8.8

MGf_LOCAL was introduced by perl commit a5063e7cd8fef802efd25ffe9df2c3748f4254f6 in 5.9.3
and back-ported to 5.8.9.

Based on a patch from https://stackoverflow.com/a/49521058/11510760

Modified:
    perl/modperl/trunk/src/modules/perl/modperl_env.c

Modified: perl/modperl/trunk/src/modules/perl/modperl_env.c
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/modperl_env.c?rev=1868115&r1=1868114&r2=1868115&view=diff
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_env.c (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_env.c Tue Oct  8 07:41:31 2019
@@ -541,7 +541,10 @@ static int modperl_env_magic_local_all(p
     nmg = sv_magicext(nsv, mg->mg_obj, mg->mg_type, &MP_vtbl_env, (char*)NULL,
0);
     nmg->mg_ptr = mg->mg_ptr;
     nmg->mg_flags |= MGf_COPY;
+#if (PERL_REVISION == 5 && PERL_VERSION == 8 && PERL_SUBVERSION > 8) ||
\
+    MP_PERL_VERSION_AT_LEAST(5, 9, 3)
     nmg->mg_flags |= MGf_LOCAL;
+#endif
 
     return 1;
 }
@@ -679,7 +682,10 @@ void modperl_env_init(pTHX)
     /* Add our version instead */
     mg = sv_magicext((SV*)ENVHV, (SV*)NULL, PERL_MAGIC_env, &MP_vtbl_env, (char*)NULL,
0);
     mg->mg_flags |= MGf_COPY;
+#if (PERL_REVISION == 5 && PERL_VERSION == 8 && PERL_SUBVERSION > 8) ||
\
+    MP_PERL_VERSION_AT_LEAST(5, 9, 3)
     mg->mg_flags |= MGf_LOCAL;
+#endif
 }
 
 void modperl_env_unload(pTHX)



Mime
View raw message