Author: randyk
Date: Thu May 5 22:42:25 2005
New Revision: 168524
URL: http://svn.apache.org/viewcvs?rev=168524&view=rev
Log:
Add APR_STATUS_IS_EACCES and APR_STATUS_IS_ENOENT to functions
in APR::Status, and use in ModPerl::RegistryCooker.
Modified:
perl/modperl/trunk/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm
perl/modperl/trunk/xs/APR/Status/APR__Status.h
perl/modperl/trunk/xs/maps/apr_functions.map
Modified: perl/modperl/trunk/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm
URL:
http://svn.apache.org/viewcvs/perl/modperl/trunk/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm?rev=168524&r1=168523&r2=168524&view=diff
==============================================================================
--- perl/modperl/trunk/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm (original)
+++ perl/modperl/trunk/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm Thu May
5 22:42:25 2005
@@ -34,6 +34,7 @@
use Apache2::Access ();
use APR::Table ();
+use APR::Status ();
use ModPerl::Util ();
use ModPerl::Global ();
@@ -41,7 +42,6 @@
use File::Spec::Functions ();
use File::Basename;
-use APR::Const -compile => qw(EACCES ENOENT);
use Apache2::Const -compile => qw(:common &OPT_EXECCGI);
use ModPerl::Const -compile => 'EXIT';
@@ -542,8 +542,8 @@
$self->log_error("$@");
if (ref $@ eq 'APR::Error') {
- return Apache2::Const::FORBIDDEN if $@ == APR::Const::EACCES;
- return Apache2::Const::NOT_FOUND if $@ == APR::Const::ENOENT;
+ return Apache2::Const::FORBIDDEN if APR::Status::is_EACCES($@);
+ return Apache2::Const::NOT_FOUND if APR::Status::is_ENOENT($@);
}
else {
return Apache2::Const::SERVER_ERROR;
Modified: perl/modperl/trunk/xs/APR/Status/APR__Status.h
URL:
http://svn.apache.org/viewcvs/perl/modperl/trunk/xs/APR/Status/APR__Status.h?rev=168524&r1=168523&r2=168524&view=diff
==============================================================================
--- perl/modperl/trunk/xs/APR/Status/APR__Status.h (original)
+++ perl/modperl/trunk/xs/APR/Status/APR__Status.h Thu May 5 22:42:25 2005
@@ -16,3 +16,5 @@
#include "apr_errno.h"
#define mpxs_APR__Status_is_EAGAIN APR_STATUS_IS_EAGAIN
+#define mpxs_APR__Status_is_EACCES APR_STATUS_IS_EACCES
+#define mpxs_APR__Status_is_ENOENT APR_STATUS_IS_ENOENT
Modified: perl/modperl/trunk/xs/maps/apr_functions.map
URL:
http://svn.apache.org/viewcvs/perl/modperl/trunk/xs/maps/apr_functions.map?rev=168524&r1=168523&r2=168524&view=diff
==============================================================================
--- perl/modperl/trunk/xs/maps/apr_functions.map (original)
+++ perl/modperl/trunk/xs/maps/apr_functions.map Thu May 5 22:42:25 2005
@@ -649,3 +649,5 @@
MODULE=APR::Status PREFIX=mpxs_APR__STATUS_
int:DEFINE_is_EAGAIN | | apr_status_t:rc
+ int:DEFINE_is_EACCES | | apr_status_t:rc
+ int:DEFINE_is_ENOENT | | apr_status_t:rc