Author: jkaluza Date: Thu Jun 27 06:56:24 2013 New Revision: 1497224 URL: http://svn.apache.org/r1497224 Log: Compile new authz/authn API only with httpd-2.4.
Modified: perl/modperl/branches/httpd24/src/modules/perl/mod_perl.c perl/modperl/branches/httpd24/src/modules/perl/modperl_cmd.c perl/modperl/branches/httpd24/src/modules/perl/modperl_cmd.h perl/modperl/branches/httpd24/src/modules/perl/modperl_util.c perl/modperl/branches/httpd24/src/modules/perl/modperl_util.h Modified: perl/modperl/branches/httpd24/src/modules/perl/mod_perl.c URL: http://svn.apache.org/viewvc/perl/modperl/branches/httpd24/src/modules/perl/mod_perl.c?rev=1497224&r1=1497223&r2=1497224&view=diff ============================================================================== --- perl/modperl/branches/httpd24/src/modules/perl/mod_perl.c (original) +++ perl/modperl/branches/httpd24/src/modules/perl/mod_perl.c Thu Jun 27 06:56:24 2013 @@ -911,8 +911,11 @@ static const command_rec modperl_cmds[] MP_CMD_DIR_ITERATE("PerlRequire", requires, "PerlRequire"), MP_CMD_SRV_ITERATE("PerlConfigRequire", config_requires, "PerlConfigRequire"), MP_CMD_SRV_ITERATE("PerlPostConfigRequire", post_config_requires, "PerlPostConfigRequire"), +#if AP_SERVER_MAJORVERSION_NUMBER>2 || \ + (AP_SERVER_MAJORVERSION_NUMBER == 2 && AP_SERVER_MINORVERSION_NUMBER>=3) MP_CMD_SRV_TAKE2("PerlAddAuthzProvider", authz_provider, "PerlAddAuthzProvider"), MP_CMD_SRV_TAKE2("PerlAddAuthnProvider", authn_provider, "PerlAddAuthnProvider"), +#endif MP_CMD_DIR_ITERATE("PerlOptions", options, "Perl Options"), MP_CMD_DIR_ITERATE("PerlInitHandler", init_handlers, "Subroutine name"), MP_CMD_DIR_TAKE2("PerlSetVar", set_var, "PerlSetVar"), Modified: perl/modperl/branches/httpd24/src/modules/perl/modperl_cmd.c URL: http://svn.apache.org/viewvc/perl/modperl/branches/httpd24/src/modules/perl/modperl_cmd.c?rev=1497224&r1=1497223&r2=1497224&view=diff ============================================================================== --- perl/modperl/branches/httpd24/src/modules/perl/modperl_cmd.c (original) +++ perl/modperl/branches/httpd24/src/modules/perl/modperl_cmd.c Thu Jun 27 06:56:24 2013 @@ -417,6 +417,9 @@ MP_CMD_SRV_DECLARE(init_handlers) return modperl_cmd_post_read_request_handlers(parms, mconfig, arg); } +#if AP_SERVER_MAJORVERSION_NUMBER>2 || \ + (AP_SERVER_MAJORVERSION_NUMBER == 2 && AP_SERVER_MINORVERSION_NUMBER>=3) + MP_CMD_SRV_DECLARE2(authz_provider) { apr_pool_t *p = parms->pool; @@ -441,6 +444,8 @@ MP_CMD_SRV_DECLARE2(authn_provider) return NULL; } +#endif + static const char *modperl_cmd_parse_args(apr_pool_t *p, const char *args, apr_table_t **t) Modified: perl/modperl/branches/httpd24/src/modules/perl/modperl_cmd.h URL: http://svn.apache.org/viewvc/perl/modperl/branches/httpd24/src/modules/perl/modperl_cmd.h?rev=1497224&r1=1497223&r2=1497224&view=diff ============================================================================== --- perl/modperl/branches/httpd24/src/modules/perl/modperl_cmd.h (original) +++ perl/modperl/branches/httpd24/src/modules/perl/modperl_cmd.h Thu Jun 27 06:56:24 2013 @@ -42,8 +42,11 @@ MP_CMD_SRV_DECLARE(modules); MP_CMD_SRV_DECLARE(requires); MP_CMD_SRV_DECLARE(config_requires); MP_CMD_SRV_DECLARE(post_config_requires); +#if AP_SERVER_MAJORVERSION_NUMBER>2 || \ + (AP_SERVER_MAJORVERSION_NUMBER == 2 && AP_SERVER_MINORVERSION_NUMBER>=3) MP_CMD_SRV_DECLARE2(authz_provider); MP_CMD_SRV_DECLARE2(authn_provider); +#endif MP_CMD_SRV_DECLARE2(set_var); MP_CMD_SRV_DECLARE2(add_var); MP_CMD_SRV_DECLARE2(set_env); Modified: perl/modperl/branches/httpd24/src/modules/perl/modperl_util.c URL: http://svn.apache.org/viewvc/perl/modperl/branches/httpd24/src/modules/perl/modperl_util.c?rev=1497224&r1=1497223&r2=1497224&view=diff ============================================================================== --- perl/modperl/branches/httpd24/src/modules/perl/modperl_util.c (original) +++ perl/modperl/branches/httpd24/src/modules/perl/modperl_util.c Thu Jun 27 06:56:24 2013 @@ -911,6 +911,9 @@ U16 *modperl_code_attrs(pTHX_ CV *cv) { return &(mg->mg_private); } +#if AP_SERVER_MAJORVERSION_NUMBER>2 || \ + (AP_SERVER_MAJORVERSION_NUMBER == 2 && AP_SERVER_MINORVERSION_NUMBER>=3) + static apr_hash_t *global_authz_providers = NULL; static apr_hash_t *global_authn_providers = NULL; @@ -1213,3 +1216,5 @@ apr_status_t modperl_register_auth_provi return register_auth_provider(pool, provider_group, provider_name_dup, provider_version, ab, type); } + +#endif /* httpd-2.4 */ Modified: perl/modperl/branches/httpd24/src/modules/perl/modperl_util.h URL: http://svn.apache.org/viewvc/perl/modperl/branches/httpd24/src/modules/perl/modperl_util.h?rev=1497224&r1=1497223&r2=1497224&view=diff ============================================================================== --- perl/modperl/branches/httpd24/src/modules/perl/modperl_util.h (original) +++ perl/modperl/branches/httpd24/src/modules/perl/modperl_util.h Thu Jun 27 06:56:24 2013 @@ -151,6 +151,8 @@ SV *modperl_pnotes(pTHX_ HV **pnotes, SV U16 *modperl_code_attrs(pTHX_ CV *cv); +#if AP_SERVER_MAJORVERSION_NUMBER>2 || \ + (AP_SERVER_MAJORVERSION_NUMBER == 2 && AP_SERVER_MINORVERSION_NUMBER>=3) apr_status_t modperl_register_auth_provider(apr_pool_t *pool, const char *provider_group, const char *provider_name, @@ -164,5 +166,6 @@ modperl_register_auth_provider_name(apr_ const char *provider_version, const char *callback1, const char *callback2, int type); +#endif #endif /* MODPERL_UTIL_H */