Skip to content

Commit a5163c7

Browse files
author
Steve Hay
committed
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) ........ git-svn-id: https://svn.apache.org/repos/asf/perl/modperl/branches/httpd24threading@1537771 13f79535-47bb-0310-9956-ffa450edef68
1 parent 9c0b0d7 commit a5163c7

File tree

7 files changed

+29
-9
lines changed

7 files changed

+29
-9
lines changed

src/modules/perl/modperl_cmd.c

+2
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,10 @@ MP_CMD_SRV_DECLARE(perldo)
585585
arg, NULL);
586586
}
587587

588+
#ifdef USE_ITHREADS
588589
MP_TRACE_i(MP_FUNC, "using interp %lx to execute perl section:\n%s",
589590
scfg->mip->parent, arg);
591+
#endif
590592

591593
{
592594
SV *server = MP_PERLSECTIONS_SERVER_SV;

src/modules/perl/modperl_types.h

+5-3
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ typedef struct {
4040
server_rec *s;
4141
} modperl_rcs_t;
4242

43+
typedef struct modperl_config_con_t modperl_config_con_t;
44+
4345
#ifdef USE_ITHREADS
4446

4547
typedef struct modperl_list_t modperl_list_t;
@@ -52,7 +54,7 @@ struct modperl_list_t {
5254
typedef struct modperl_interp_t modperl_interp_t;
5355
typedef struct modperl_interp_pool_t modperl_interp_pool_t;
5456
typedef struct modperl_tipool_t modperl_tipool_t;
55-
typedef struct modperl_config_con_t modperl_config_con_t;
57+
typedef struct modperl_tipool_config_t modperl_tipool_config_t;
5658

5759
struct modperl_interp_t {
5860
modperl_interp_pool_t *mip;
@@ -80,13 +82,13 @@ typedef struct {
8082
modperl_list_t *listp);
8183
} modperl_tipool_vtbl_t;
8284

83-
typedef struct {
85+
struct modperl_tipool_config_t {
8486
int start; /* number of items to create at startup */
8587
int min_spare; /* minimum number of spare items */
8688
int max_spare; /* maximum number of spare items */
8789
int max; /* maximum number of items */
8890
int max_requests; /* maximum number of requests per item */
89-
} modperl_tipool_config_t;
91+
};
9092

9193
struct modperl_tipool_t {
9294
perl_mutex tiplock;

t/directive/perlcleanuphandler.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use Apache::Test;
66
use Apache::TestUtil;
77
use Apache::TestRequest 'GET_BODY';
88

9-
plan tests => 3;
9+
plan tests => 3, need_lwp;
1010

1111
my $module = 'TestDirective::perlcleanuphandler';
1212

t/response/TestModperl/interpreter.pm

+8-5
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ use warnings FATAL => 'all';
77
use Apache::Test;
88
use Apache::TestUtil;
99

10-
use ModPerl::Interpreter ();
11-
use ModPerl::InterpPool ();
12-
use ModPerl::TiPool ();
13-
use ModPerl::TiPoolConfig ();
1410
use Apache2::MPM ();
1511

1612
use Apache2::Const -compile => 'OK';
@@ -20,7 +16,14 @@ sub handler {
2016

2117
my $is_threaded=Apache2::MPM->is_threaded;
2218

23-
plan $r, tests => $is_threaded?17:5;
19+
plan $r, tests => $is_threaded?17:5, need
20+
need_threads,
21+
{"perl >= 5.8.1 is required (this is $])" => ($] >= 5.008001)};
22+
23+
require ModPerl::Interpreter;
24+
require ModPerl::InterpPool;
25+
require ModPerl::TiPool;
26+
require ModPerl::TiPoolConfig;
2427

2528
my $interp = ModPerl::Interpreter->current;
2629

xs/maps/modperl_functions.map

+4
Original file line numberDiff line numberDiff line change
@@ -175,5 +175,9 @@ MODULE=Apache2::MPM PACKAGE=Apache2::MPM BOOT=1
175175
MODULE=Apache2::Access PACKAGE=guess
176176
mpxs_Apache2__RequestRec_allow_override_opts
177177

178+
#_if_ do {use Apache2::Build; Apache2::Build::PERL_HAS_ITHREADS}
179+
178180
MODULE=ModPerl::Interpreter
179181
mpxs_ModPerl__Interpreter_current | | class=Nullsv
182+
183+
#_end_

xs/maps/modperl_structures.map

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# for mapping see %ModPerl::MapUtil::disabled_map in
44
# lib/ModPerl/MapUtil.pm
55

6+
#_if_ do {use Apache2::Build; Apache2::Build::PERL_HAS_ITHREADS}
7+
68
<modperl_interp_t>
79
< mip
810
< perl
@@ -38,3 +40,5 @@
3840
< max
3941
< max_requests
4042
</modperl_tipool_config_t>
43+
44+
#_end_

xs/maps/modperl_types.map

+5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
########## mod_perl types ##########
22

33
struct modperl_filter_t | Apache2::OutputFilter
4+
5+
#_if_ do {use Apache2::Build; Apache2::Build::PERL_HAS_ITHREADS}
6+
47
struct modperl_interp_t | ModPerl::Interpreter
58
struct modperl_interp_pool_t | ModPerl::InterpPool
69
struct modperl_tipool_t | ModPerl::TiPool
710
struct modperl_tipool_config_t | ModPerl::TiPoolConfig
811
PerlInterpreter * | IV
912

13+
#_end_
14+
1015
########## Perl types ##########
1116

1217
SV * | SV

0 commit comments

Comments
 (0)