Author: stevehay
Date: Thu Oct 31 23:53:59 2013
New Revision: 1537771
URL: http://svn.apache.org/r1537771
Log:
Merged revision(s) 933550, 940297, 940303 from perl/modperl/branches/threading:
t/directive/perlcleanuphandler.t needs LWP to perform keep-alive requests
........
now it compiles and tests with a non-threaded perl
........
silence a warning (useless storage class specifier in empty declaration)
........
Modified:
perl/modperl/branches/httpd24threading/ (props changed)
perl/modperl/branches/httpd24threading/src/modules/perl/modperl_cmd.c
perl/modperl/branches/httpd24threading/src/modules/perl/modperl_types.h
perl/modperl/branches/httpd24threading/t/directive/perlcleanuphandler.t
perl/modperl/branches/httpd24threading/t/response/TestModperl/interpreter.pm
perl/modperl/branches/httpd24threading/xs/maps/modperl_functions.map
perl/modperl/branches/httpd24threading/xs/maps/modperl_structures.map
perl/modperl/branches/httpd24threading/xs/maps/modperl_types.map
Propchange: perl/modperl/branches/httpd24threading/
------------------------------------------------------------------------------
Merged /perl/modperl/branches/threading:r933550,940297,940303
Modified: perl/modperl/branches/httpd24threading/src/modules/perl/modperl_cmd.c
URL:
http://svn.apache.org/viewvc/perl/modperl/branches/httpd24threading/src/modules/perl/modperl_cmd.c?rev=1537771&r1=1537770&r2=1537771&view=diff
==============================================================================
--- perl/modperl/branches/httpd24threading/src/modules/perl/modperl_cmd.c
(original)
+++ perl/modperl/branches/httpd24threading/src/modules/perl/modperl_cmd.c Thu
Oct 31 23:53:59 2013
@@ -585,8 +585,10 @@ MP_CMD_SRV_DECLARE(perldo)
arg, NULL);
}
+#ifdef USE_ITHREADS
MP_TRACE_i(MP_FUNC, "using interp %lx to execute perl section:\n%s",
scfg->mip->parent, arg);
+#endif
{
SV *server = MP_PERLSECTIONS_SERVER_SV;
Modified:
perl/modperl/branches/httpd24threading/src/modules/perl/modperl_types.h
URL:
http://svn.apache.org/viewvc/perl/modperl/branches/httpd24threading/src/modules/perl/modperl_types.h?rev=1537771&r1=1537770&r2=1537771&view=diff
==============================================================================
--- perl/modperl/branches/httpd24threading/src/modules/perl/modperl_types.h
(original)
+++ perl/modperl/branches/httpd24threading/src/modules/perl/modperl_types.h Thu
Oct 31 23:53:59 2013
@@ -40,6 +40,8 @@ typedef struct {
server_rec *s;
} modperl_rcs_t;
+typedef struct modperl_config_con_t modperl_config_con_t;
+
#ifdef USE_ITHREADS
typedef struct modperl_list_t modperl_list_t;
@@ -52,7 +54,7 @@ struct modperl_list_t {
typedef struct modperl_interp_t modperl_interp_t;
typedef struct modperl_interp_pool_t modperl_interp_pool_t;
typedef struct modperl_tipool_t modperl_tipool_t;
-typedef struct modperl_config_con_t modperl_config_con_t;
+typedef struct modperl_tipool_config_t modperl_tipool_config_t;
struct modperl_interp_t {
modperl_interp_pool_t *mip;
@@ -80,13 +82,13 @@ typedef struct {
modperl_list_t *listp);
} modperl_tipool_vtbl_t;
-typedef struct {
+struct modperl_tipool_config_t {
int start; /* number of items to create at startup */
int min_spare; /* minimum number of spare items */
int max_spare; /* maximum number of spare items */
int max; /* maximum number of items */
int max_requests; /* maximum number of requests per item */
-} modperl_tipool_config_t;
+};
struct modperl_tipool_t {
perl_mutex tiplock;
Modified:
perl/modperl/branches/httpd24threading/t/directive/perlcleanuphandler.t
URL:
http://svn.apache.org/viewvc/perl/modperl/branches/httpd24threading/t/directive/perlcleanuphandler.t?rev=1537771&r1=1537770&r2=1537771&view=diff
==============================================================================
--- perl/modperl/branches/httpd24threading/t/directive/perlcleanuphandler.t
(original)
+++ perl/modperl/branches/httpd24threading/t/directive/perlcleanuphandler.t Thu
Oct 31 23:53:59 2013
@@ -6,7 +6,7 @@ use Apache::Test;
use Apache::TestUtil;
use Apache::TestRequest 'GET_BODY';
-plan tests => 3;
+plan tests => 3, need_lwp;
my $module = 'TestDirective::perlcleanuphandler';
Modified:
perl/modperl/branches/httpd24threading/t/response/TestModperl/interpreter.pm
URL:
http://svn.apache.org/viewvc/perl/modperl/branches/httpd24threading/t/response/TestModperl/interpreter.pm?rev=1537771&r1=1537770&r2=1537771&view=diff
==============================================================================
---
perl/modperl/branches/httpd24threading/t/response/TestModperl/interpreter.pm
(original)
+++
perl/modperl/branches/httpd24threading/t/response/TestModperl/interpreter.pm
Thu Oct 31 23:53:59 2013
@@ -7,10 +7,6 @@ use warnings FATAL => 'all';
use Apache::Test;
use Apache::TestUtil;
-use ModPerl::Interpreter ();
-use ModPerl::InterpPool ();
-use ModPerl::TiPool ();
-use ModPerl::TiPoolConfig ();
use Apache2::MPM ();
use Apache2::Const -compile => 'OK';
@@ -20,7 +16,14 @@ sub handler {
my $is_threaded=Apache2::MPM->is_threaded;
- plan $r, tests => $is_threaded?17:5;
+ plan $r, tests => $is_threaded?17:5, need
+ need_threads,
+ {"perl >= 5.8.1 is required (this is $])" => ($] >= 5.008001)};
+
+ require ModPerl::Interpreter;
+ require ModPerl::InterpPool;
+ require ModPerl::TiPool;
+ require ModPerl::TiPoolConfig;
my $interp = ModPerl::Interpreter->current;
Modified: perl/modperl/branches/httpd24threading/xs/maps/modperl_functions.map
URL:
http://svn.apache.org/viewvc/perl/modperl/branches/httpd24threading/xs/maps/modperl_functions.map?rev=1537771&r1=1537770&r2=1537771&view=diff
==============================================================================
--- perl/modperl/branches/httpd24threading/xs/maps/modperl_functions.map
(original)
+++ perl/modperl/branches/httpd24threading/xs/maps/modperl_functions.map Thu
Oct 31 23:53:59 2013
@@ -175,5 +175,9 @@ MODULE=Apache2::MPM PACKAGE=Apache2::
MODULE=Apache2::Access PACKAGE=guess
mpxs_Apache2__RequestRec_allow_override_opts
+#_if_ do {use Apache2::Build; Apache2::Build::PERL_HAS_ITHREADS}
+
MODULE=ModPerl::Interpreter
mpxs_ModPerl__Interpreter_current | | class=Nullsv
+
+#_end_
Modified: perl/modperl/branches/httpd24threading/xs/maps/modperl_structures.map
URL:
http://svn.apache.org/viewvc/perl/modperl/branches/httpd24threading/xs/maps/modperl_structures.map?rev=1537771&r1=1537770&r2=1537771&view=diff
==============================================================================
--- perl/modperl/branches/httpd24threading/xs/maps/modperl_structures.map
(original)
+++ perl/modperl/branches/httpd24threading/xs/maps/modperl_structures.map Thu
Oct 31 23:53:59 2013
@@ -3,6 +3,8 @@
# for mapping see %ModPerl::MapUtil::disabled_map in
# lib/ModPerl/MapUtil.pm
+#_if_ do {use Apache2::Build; Apache2::Build::PERL_HAS_ITHREADS}
+
<modperl_interp_t>
< mip
< perl
@@ -38,3 +40,5 @@
< max
< max_requests
</modperl_tipool_config_t>
+
+#_end_
Modified: perl/modperl/branches/httpd24threading/xs/maps/modperl_types.map
URL:
http://svn.apache.org/viewvc/perl/modperl/branches/httpd24threading/xs/maps/modperl_types.map?rev=1537771&r1=1537770&r2=1537771&view=diff
==============================================================================
--- perl/modperl/branches/httpd24threading/xs/maps/modperl_types.map (original)
+++ perl/modperl/branches/httpd24threading/xs/maps/modperl_types.map Thu Oct 31
23:53:59 2013
@@ -1,12 +1,17 @@
########## mod_perl types ##########
struct modperl_filter_t | Apache2::OutputFilter
+
+#_if_ do {use Apache2::Build; Apache2::Build::PERL_HAS_ITHREADS}
+
struct modperl_interp_t | ModPerl::Interpreter
struct modperl_interp_pool_t | ModPerl::InterpPool
struct modperl_tipool_t | ModPerl::TiPool
struct modperl_tipool_config_t | ModPerl::TiPoolConfig
PerlInterpreter * | IV
+#_end_
+
########## Perl types ##########
SV * | SV