Change apr version macro by apache one

This commit is contained in:
brenosilva
2011-05-18 18:33:20 +00:00
parent de463a85ce
commit e1025d0f0c
2 changed files with 5 additions and 5 deletions

View File

@@ -880,7 +880,7 @@ static int hook_request_late(request_rec *r) {
/** /**
* Invoked every time Apache has something to write to the error log. * Invoked every time Apache has something to write to the error log.
*/ */
#if APR_MAJOR_VERSION > 1 #if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER > 2
static void hook_error_log(const char *file, int line, int module_index, int level, apr_status_t status, static void hook_error_log(const char *file, int line, int module_index, int level, apr_status_t status,
const server_rec *s, const request_rec *r, apr_pool_t *mp, const char *fmt) const server_rec *s, const request_rec *r, apr_pool_t *mp, const char *fmt)
#else #else
@@ -1204,7 +1204,7 @@ static int hook_connection_early(conn_rec *conn)
int i, j; int i, j;
unsigned long int ip_count = 0, ip_count_w = 0; unsigned long int ip_count = 0, ip_count_w = 0;
worker_score *ws_record = NULL; worker_score *ws_record = NULL;
#if APR_MAJOR_VERSION > 1 #if AP_SERVER_MINORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER > 2
ap_sb_handle_t *sbh = NULL; ap_sb_handle_t *sbh = NULL;
#endif #endif
@@ -1218,7 +1218,7 @@ static int hook_connection_early(conn_rec *conn)
for (i = 0; i < server_limit; ++i) { for (i = 0; i < server_limit; ++i) {
for (j = 0; j < thread_limit; ++j) { for (j = 0; j < thread_limit; ++j) {
#if APR_MAJOR_VERSION > 1 #if AP_SERVER_MINORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER > 2
sbh = conn->sbh; sbh = conn->sbh;
if (sbh == NULL) { if (sbh == NULL) {
return DECLINED; return DECLINED;

View File

@@ -122,7 +122,7 @@ int modsecurity_init(msc_engine *msce, apr_pool_t *mp) {
} }
#ifdef __SET_MUTEX_PERMS #ifdef __SET_MUTEX_PERMS
#if APR_MAJOR_VERSION > 1 #if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER > 2
rc = ap_unixd_set_global_mutex_perms(msce->auditlog_lock); rc = ap_unixd_set_global_mutex_perms(msce->auditlog_lock);
#else #else
rc = unixd_set_global_mutex_perms(msce->auditlog_lock); rc = unixd_set_global_mutex_perms(msce->auditlog_lock);
@@ -140,7 +140,7 @@ int modsecurity_init(msc_engine *msce, apr_pool_t *mp) {
} }
#ifdef __SET_MUTEX_PERMS #ifdef __SET_MUTEX_PERMS
#if APR_MAJOR_VERSION > 1 #if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER > 2
rc = ap_unixd_set_global_mutex_perms(msce->geo_lock); rc = ap_unixd_set_global_mutex_perms(msce->geo_lock);
#else #else
rc = unixd_set_global_mutex_perms(msce->geo_lock); rc = unixd_set_global_mutex_perms(msce->geo_lock);