Attached is a patch that gets mod_perl 1 + perl 5.14 going, or at least gets it to build and pass
tests. I haven't ran any of my apps against it yet.
--- mod_perl-1.31/src/modules/perl/mod_perl.orig.h 2011-07-11 17:16:57.000000000 -0700
+++ mod_perl-1.31/src/modules/perl/mod_perl.h 2011-07-11 17:31:59.000000000 -0700
@@ -1026,6 +1026,14 @@
#define PERL_HEADER_PARSER_CREATE(s)
#endif
+#ifndef GvCV_set
+#define GvCV_set(gv, cv) (GvCV(gv) = (cv))
+#endif
+
+#ifndef GvCV_set
+#define CvGV_set(gv, cv) (CvVG(gv) = (cv))
+#endif
+
typedef struct {
array_header *PerlPassEnv;
array_header *PerlRequire;
--- mod_perl-1.31/Symbol/Symbol.orig.xs 2011-07-11 17:34:18.000000000 -0700
+++ mod_perl-1.31/Symbol/Symbol.xs 2011-07-11 17:37:28.000000000 -0700
@@ -30,7 +30,7 @@
has_proto = TRUE;
cv_undef(cv);
- CvGV(cv) = gv; /* let user-undef'd sub keep its identity */
+ CvGV_set(cv, gv); /* let user-undef'd sub keep its identity */
if(has_proto)
SvPOK_on(cv); /* otherwise we get `Prototype mismatch:' */
--- mod_perl-1.31/src/modules/perl/mod_perl.orig.c 2011-07-11 17:06:31.000000000 -0700
+++ mod_perl-1.31/src/modules/perl/mod_perl.c 2011-07-11 17:15:24.000000000 -0700
@@ -785,7 +785,7 @@
/* *CORE::GLOBAL::exit = \&Apache::exit */
if(gv_stashpv("CORE::GLOBAL", FALSE)) {
GV *exitgp = gv_fetchpv("CORE::GLOBAL::exit", TRUE, SVt_PVCV);
- GvCV(exitgp) = perl_get_cv("Apache::exit", TRUE);
+ GvCV_set(exitgp, perl_get_cv("Apache::exit", TRUE));
GvIMPORTED_CV_on(exitgp);
}
--- mod_perl-1.31/src/modules/perl/perl_config.orig.c 2011-07-11 17:25:44.000000000 -0700
+++ mod_perl-1.31/src/modules/perl/perl_config.c 2011-07-11 17:29:07.000000000 -0700
@@ -1720,7 +1720,7 @@
if((cv = GvCV((GV*)val)) && (GvSTASH((GV*)val) == GvSTASH(CvGV(cv)))) {
GV *gv = CvGV(cv);
cv_undef(cv);
- CvGV(cv) = gv;
+ CvGV_set(cv, gv);
GvCVGEN(gv) = 1; /* invalidate method cache */
}
}
--- mod_perl-1.31/src/modules/perl/Log.orig.xs 2011-07-11 17:06:20.000000000 -0700
+++ mod_perl-1.31/src/modules/perl/Log.xs 2011-07-11 17:13:19.000000000 -0700
@@ -10,7 +10,7 @@
static void perl_cv_alias(char *to, char *from)
{
GV *gp = gv_fetchpv(to, TRUE, SVt_PVCV);
- GvCV(gp) = perl_get_cv(from, TRUE);
+ GvCV_set(gp, perl_get_cv(from, TRUE));
}
static void ApacheLog(int level, SV *sv, SV *msg)
--- mod_perl-1.31/src/modules/perl/Constants.orig.xs 2011-07-11 17:06:11.000000000 -0700
+++ mod_perl-1.31/src/modules/perl/Constants.xs 2011-07-11 17:12:29.000000000 -0700
@@ -20,7 +20,7 @@
SvPVX(caller), sub, SvPVX(pclass), sub);
#endif
gv = gv_fetchpv(form("%_::%s", caller, sub), TRUE, SVt_PVCV);
- GvCV(gv) = perl_get_cv(form("%_::%s", pclass, sub), TRUE);
+ GvCV_set(gv, perl_get_cv(form("%_::%s", pclass, sub), TRUE));
GvIMPORTED_CV_on(gv);
}