Skip to content

Commit

Permalink
Restore build with Perl 5.8.x (although 5.8.0 still has other problem…
Browse files Browse the repository at this point in the history
…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
Steve Hay committed Mar 17, 2013
1 parent a21585e commit c1b307a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -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()) {
Expand Down
7 changes: 7 additions & 0 deletions src/modules/perl/modperl_perl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.