Return-Path: Delivered-To: apmail-perl-modperl-cvs-archive@www.apache.org Received: (qmail 24790 invoked from network); 19 Oct 2010 16:44:56 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Oct 2010 16:44:56 -0000 Received: (qmail 61500 invoked by uid 500); 19 Oct 2010 16:44:56 -0000 Delivered-To: apmail-perl-modperl-cvs-archive@perl.apache.org Received: (qmail 61464 invoked by uid 500); 19 Oct 2010 16:44:56 -0000 Mailing-List: contact modperl-cvs-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@perl.apache.org List-Id: Delivered-To: mailing list modperl-cvs@perl.apache.org Received: (qmail 61457 invoked by uid 99); 19 Oct 2010 16:44:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 16:44:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 16:44:54 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CCA2023888FD; Tue, 19 Oct 2010 16:43:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1024316 - in /perl/modperl/branches/threading: ./ Changes Makefile.PL lib/Apache2/Build.pm lib/ModPerl/BuildOptions.pm t/response/TestAPR/socket.pm xs/APR/Socket/APR__Socket.h xs/maps/apr_functions.map Date: Tue, 19 Oct 2010 16:43:58 -0000 To: modperl-cvs@perl.apache.org From: torsten@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101019164358.CCA2023888FD@eris.apache.org> Author: torsten Date: Tue Oct 19 16:43:58 2010 New Revision: 1024316 URL: http://svn.apache.org/viewvc?rev=1024316&view=rev Log: Merged revisions 987933,991269,1023553 via svnmerge from https://svn.eu.apache.org/repos/asf/perl/modperl/trunk ........ r987933 | torsten | 2010-08-22 19:51:03 +0200 (Sun, 22 Aug 2010) | 1 line make APR::Socket::fileno unimplemented on Windows ........ r991269 | torsten | 2010-08-31 19:28:10 +0200 (Tue, 31 Aug 2010) | 1 line Make sure perl is built either with multiplicity and ithreads or without both ........ r1023553 | phred | 2010-10-17 20:45:16 +0200 (Sun, 17 Oct 2010) | 6 lines Look for a usable apxs in $ENV{PATH} if all other options fail, then prompt the user for one. Work around bootstrap warnings when Apache2::BuildConfig has not been created yet. Remove Apache::test compatibility (part of mod_perl 1.2.7), that code causes build issues and is 4 versions out of date. ........ Modified: perl/modperl/branches/threading/ (props changed) perl/modperl/branches/threading/Changes perl/modperl/branches/threading/Makefile.PL perl/modperl/branches/threading/lib/Apache2/Build.pm perl/modperl/branches/threading/lib/ModPerl/BuildOptions.pm perl/modperl/branches/threading/t/response/TestAPR/socket.pm perl/modperl/branches/threading/xs/APR/Socket/APR__Socket.h perl/modperl/branches/threading/xs/maps/apr_functions.map Propchange: perl/modperl/branches/threading/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Oct 19 16:43:58 2010 @@ -1 +1 @@ -/perl/modperl/trunk:594682-672484,672819-681118,693357,700369,732889-736218,751909-752425,757553-774171,807116,807332-807649,907778-932879,933373-933563,935519,936643,940287,957309-983073,985740 +/perl/modperl/trunk:594682-672484,672819-681118,693357,700369,732889-736218,751909-752425,757553-774171,807116,807332-807649,907778-932879,933373-933563,935519,936643,940287,957309-983073,985740,987933-1023553 Propchange: perl/modperl/branches/threading/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Tue Oct 19 16:43:58 2010 @@ -1 +1 @@ -/perl/modperl/trunk:1-712967,712969-987865 +/perl/modperl/trunk:1-712967,712969-1024315 Modified: perl/modperl/branches/threading/Changes URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/Changes?rev=1024316&r1=1024315&r2=1024316&view=diff ============================================================================== --- perl/modperl/branches/threading/Changes (original) +++ perl/modperl/branches/threading/Changes Tue Oct 19 16:43:58 2010 @@ -31,6 +31,18 @@ Expose modperl_interp_t via ModPerl::Int =item 2.0.5-dev +Look for a usable apxs in $ENV{PATH} if all other options fail, then prompt the user for one. +[Phred] + +Work around bootstrap warnings when Apache2::BuildConfig has not been created yet. +[Phred] + +Remove Apache::test compatibility (part of mod_perl 1.2.7), that code causes build issues and is 4 versions out of date. +[Phred] + +Make sure perl is built either with multiplicity and ithreads or without +both [Theory, Torsten] + Support for "install_vendor" and "install_site" make targets [Torsten] Run tests on bundled pure perl Apache::* modules [Gozer, Phred] Modified: perl/modperl/branches/threading/Makefile.PL URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/Makefile.PL?rev=1024316&r1=1024315&r2=1024316&view=diff ============================================================================== --- perl/modperl/branches/threading/Makefile.PL (original) +++ perl/modperl/branches/threading/Makefile.PL Tue Oct 19 16:43:58 2010 @@ -21,6 +21,7 @@ BEGIN { $old_Apache2_pm = delete $INC{'Apache2.pm'}; } }; + } use lib qw(lib Apache-Test/lib); @@ -540,6 +541,19 @@ sub perl_version_check { "Upgrade to Perl 5.8.0 or higher"; exit 1; } + + if ($Config{usemultiplicity} xor $Config{usethreads}) { + error "mod_perl does not currently support multiplicity without ". + "ithreads."; + if ($build->mpm_is_threaded()) { + error "Please recompile Perl with -Duseithreads and ". + "-Dusemultiplicity"; + } else { + error "Please recompile Perl with either -Duseithreads and ". + "-Dusemultiplicity or -Uuseithreads and -Uusemultiplicity"; + } + exit 1; + } } sub system_sanity_check { @@ -616,13 +630,6 @@ use Config; use constant WIN32 => $^O eq 'MSWin32'; use constant BUILD_APREXT => Apache2::Build::BUILD_APREXT; -my $apache_test_install; -BEGIN { - $apache_test_install = -e 'Apache-Test'; - use lib './Apache-Test'; - require 'install-pl' if $apache_test_install; -} - sub MY::top_targets { my $self = shift; my $string = $self->ModPerl::BuildMM::MY::top_targets; @@ -716,9 +723,6 @@ modperl_banner: EOF - $string .= Apache::Test::install::nuke_Apache__test_target() - if $apache_test_install; - $string; } @@ -734,9 +738,6 @@ sub MY::install { # ModPerl::MM::add_dep(\$string, "pure${kind}_install" => 'aprext_install') # if BUILD_APREXT; - ModPerl::MM::add_dep(\$string, "pure${kind}_install" => 'nuke_Apache__test') - if $apache_test_install; - ModPerl::MM::add_dep_after(\$string, "install$kind", "doc${kind}_install", 'modperl_banner'); # glue_pods target must come first Modified: perl/modperl/branches/threading/lib/Apache2/Build.pm URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/lib/Apache2/Build.pm?rev=1024316&r1=1024315&r2=1024316&view=diff ============================================================================== --- perl/modperl/branches/threading/lib/Apache2/Build.pm (original) +++ perl/modperl/branches/threading/lib/Apache2/Build.pm Tue Oct 19 16:43:58 2010 @@ -898,6 +898,10 @@ sub default_file { sub file_path { my $self = shift; + + # work around when Apache2::BuildConfig has not been created yet + return unless $self && $self->{cwd}; + my @files = map { m:^/: ? $_ : join('/', $self->{cwd}, $_) } @_; return wantarray ? @files : $files[0]; } Modified: perl/modperl/branches/threading/lib/ModPerl/BuildOptions.pm URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/lib/ModPerl/BuildOptions.pm?rev=1024316&r1=1024315&r2=1024316&view=diff ============================================================================== --- perl/modperl/branches/threading/lib/ModPerl/BuildOptions.pm (original) +++ perl/modperl/branches/threading/lib/ModPerl/BuildOptions.pm Tue Oct 19 16:43:58 2010 @@ -67,6 +67,24 @@ sub init { $build->{MP_COMPAT_1X} = 1 unless exists $build->{MP_COMPAT_1X} && !$build->{MP_COMPAT_1X}; + # make a last ditch effort to find apxs in $ENV{PATH} + if (!$build->{MP_AP_PREFIX} && !$build->{MP_APXS}) { + + my @paths = split(/:/, $ENV{PATH}); + my $potential_apxs; + while (!$potential_apxs) { + + last if scalar(@paths) == 0; # don't loop endlessly + $potential_apxs = File::Spec->catfile(shift @paths, 'apxs'); + if (-e $potential_apxs && -x $potential_apxs) { + + $build->{MP_APXS} = $potential_apxs; + print "MP_APXS unspecified, using $potential_apxs\n\n"; + } else { + undef $potential_apxs; + } + } + } } sub parse { Modified: perl/modperl/branches/threading/t/response/TestAPR/socket.pm URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/t/response/TestAPR/socket.pm?rev=1024316&r1=1024315&r2=1024316&view=diff ============================================================================== --- perl/modperl/branches/threading/t/response/TestAPR/socket.pm (original) +++ perl/modperl/branches/threading/t/response/TestAPR/socket.pm Tue Oct 19 16:43:58 2010 @@ -41,14 +41,11 @@ sub handler { $socket->timeout_set($orig_val); ok t_cmp($socket->timeout_get(), $orig_val, "timeout_get()"); - my $fd=$socket->fileno; - t_debug "client socket fd=$fd"; - if ($^O eq 'MSWin32') { - ok $fd==-1; - } - else { - ok $fd>=0; - } + skip $^O=~/mswin/i ? 'APR::Socket->fileno is not implemented on MSWin' : '', + sub { + t_debug "client socket fd=".$socket->fileno; + $socket->fileno>0 + }; Apache2::Const::OK; } Modified: perl/modperl/branches/threading/xs/APR/Socket/APR__Socket.h URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/xs/APR/Socket/APR__Socket.h?rev=1024316&r1=1024315&r2=1024316&view=diff ============================================================================== --- perl/modperl/branches/threading/xs/APR/Socket/APR__Socket.h (original) +++ perl/modperl/branches/threading/xs/APR/Socket/APR__Socket.h Tue Oct 19 16:43:58 2010 @@ -117,16 +117,14 @@ apr_status_t mpxs_APR__Socket_poll(apr_s return apr_poll(&fd, 1, &nsds, timeout); } +#ifndef WIN32 static MP_INLINE int mpxs_APR__Socket_fileno(pTHX_ apr_socket_t *sock) { -#ifdef WIN32 - return -1; /* not implemented */ -#else apr_os_sock_t s; apr_os_sock_get(&s, sock); return s; -#endif } +#endif /* * Local Variables: Modified: perl/modperl/branches/threading/xs/maps/apr_functions.map URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/xs/maps/apr_functions.map?rev=1024316&r1=1024315&r2=1024316&view=diff ============================================================================== --- perl/modperl/branches/threading/xs/maps/apr_functions.map (original) +++ perl/modperl/branches/threading/xs/maps/apr_functions.map Tue Oct 19 16:43:58 2010 @@ -55,7 +55,9 @@ MODULE=APR::Socket !apr_socket_shutdown -apr_socket_inherit_set -apr_socket_inherit_unset +#_if_ $^O !~ /mswin/i mpxs_APR__Socket_fileno | | apr_socket_t *:socket +#_end_ MODULE=APR::Socket apr_socket_close @@ -627,7 +629,11 @@ MODULE=APR::OS -apr_os_exp_time_get -apr_os_file_get -apr_os_imp_time_get +#_if_ $^O !~ /mswin/i ~apr_os_sock_get +#_else_ +-apr_os_sock_get +#_end_ -apr_os_thread_get -apr_os_threadkey_get -apr_os_sock_make