Author: stevehay Date: Thu Jul 11 23:18:41 2013 New Revision: 1502392 URL: http://svn.apache.org/r1502392 Log: Fix linking of libaprext.lib on Windows
When building against httpd-2.4+ modprel_apache_compat.h references the "extern" symbol 'perl_module' so we must provide a definition to satisfy the linker. Including the usual definition in mod_perl.c is not possible here, so just use a dummy definition instead since the symbol is not really used anyway. Added: perl/modperl/branches/httpd24/xs/APR/aprext/modperl_dummy.c Modified: perl/modperl/branches/httpd24/xs/APR/aprext/Makefile.PL Modified: perl/modperl/branches/httpd24/xs/APR/aprext/Makefile.PL URL: http://svn.apache.org/viewvc/perl/modperl/branches/httpd24/xs/APR/aprext/Makefile.PL?rev=1502392&r1=1502391&r2=1502392&view=diff ============================================================================== --- perl/modperl/branches/httpd24/xs/APR/aprext/Makefile.PL (original) +++ perl/modperl/branches/httpd24/xs/APR/aprext/Makefile.PL Thu Jul 11 23:18:41 2013 @@ -19,6 +19,8 @@ for (@names) { $src{$cfile} = "$srcdir/$cfile"; } +push @obj, q{modperl_dummy.o}; + my @skip = qw(dynamic test); push @skip, q{static} unless (Apache2::Build::BUILD_APREXT); Added: perl/modperl/branches/httpd24/xs/APR/aprext/modperl_dummy.c URL: http://svn.apache.org/viewvc/perl/modperl/branches/httpd24/xs/APR/aprext/modperl_dummy.c?rev=1502392&view=auto ============================================================================== --- perl/modperl/branches/httpd24/xs/APR/aprext/modperl_dummy.c (added) +++ perl/modperl/branches/httpd24/xs/APR/aprext/modperl_dummy.c Thu Jul 11 23:18:41 2013 @@ -0,0 +1,32 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "mod_perl.h" + +/* FIXME: To define extern perl_module to something so libaprext.lib can be + * linked without error when building against httpd-2.4+. (The symbol is + * referenced by modperl_apache_compat.h for httpd-2.4+, so must be defined + * somewhere in that case.) + */ +module AP_MODULE_DECLARE_DATA perl_module = { + STANDARD20_MODULE_STUFF, + NULL, /* dir config creater */ + NULL, /* dir merger --- default is to override */ + NULL, /* server config */ + NULL, /* merge server config */ + NULL, /* table of config file commands */ + NULL, /* register hooks */ +};