Skip to content
Browse files

Restore build with Perl 5.8.x (although 5.8.0 still has other problem…

…s for me).

- Recent perls set $Config{usethreads} to 'define' when built with ithreads, but older perls did not (-Dusethreads was different to -Duseithreads), causing a perl version check failure when wrongly testing $Config{usethreads} instead of the intended $Config{useithreads}.
- Newx and Newxz were added in 5.9.3.

git-svn-id: https://svn.apache.org/repos/asf/perl/modperl/trunk@1457512 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent a21585e commit c1b307a479ab34f40cbfd43552f1bdbbe4b55b1d Steve Hay committed Mar 17, 2013
Showing with 9 additions and 2 deletions.
  1. +2 −2 Makefile.PL
  2. +7 −0 src/modules/perl/modperl_perl.h
View
4 Makefile.PL
@@ -511,7 +511,7 @@ sub perl_version_check {
my @fail;
push @fail, "Perl 5.8 or higher"
unless $] >= 5.008;
- push @fail, "Perl built with ithreads (build perl with -Dusethreads)"
+ push @fail, "Perl built with ithreads (build perl with -Duseithreads)"
unless Apache2::Build::PERL_HAS_ITHREADS();
if (@fail) {
error "$perl_string and '$mpm' mpm httpd.",
@@ -545,7 +545,7 @@ sub perl_version_check {
exit 1;
}
- if ($Config{usemultiplicity} xor $Config{usethreads}) {
+ if ($Config{usemultiplicity} xor $Config{useithreads}) {
error "mod_perl does not currently support multiplicity without ".
"ithreads.";
if ($build->mpm_is_threaded()) {
View
7 src/modules/perl/modperl_perl.h
@@ -54,4 +54,11 @@ void modperl_hash_seed_set(pTHX);
# define GvGP_set(gv, gp) (GvGP(gv)=(gp))
#endif
+#ifndef Newx
+# define Newx(v,n,t) New(0,v,n,t)
+#endif
+#ifndef Newxz
+# define Newxz(v,n,t) Newz(0,v,n,t)
+#endif
+
#endif /* MODPERL_PERL_H */

0 comments on commit c1b307a

Please sign in to comment.
Something went wrong with that request. Please try again.