1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-23 22:49:01 +03:00

Merge r1897325, r1897326, r1897329, r1898255 from trunk

APR and APU must be at least 1.3 to be able to configure and build httpd 2.4.x.
So remove some osbolete #if in the source code.
   - mod_socache_memcache
   - mod_authn_dbd
   - mod_log_config
   - mod_proxy_ftp and proxy-util

Submitted by: jailletc36, jailletc36, jailletc36, jailletc36
Reviewed by: jailletc36, icing, rpluem
Backported by: jailletc36

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1898393 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Christophe Jaillet
2022-02-24 20:43:21 +00:00
parent 20de2acd36
commit 596dbb26eb
5 changed files with 3 additions and 34 deletions

View File

@@ -143,7 +143,6 @@ static authn_status authn_dbd_password(request_rec *r, const char *user,
return AUTH_GENERAL_ERROR;
}
if (dbd_password == NULL) {
#if APU_MAJOR_VERSION > 1 || (APU_MAJOR_VERSION == 1 && APU_MINOR_VERSION >= 3)
/* add the rest of the columns to the environment */
int i = 1;
const char *name;
@@ -168,7 +167,7 @@ static authn_status authn_dbd_password(request_rec *r, const char *user,
apr_dbd_get_entry(dbd->driver, row, i));
i++;
}
#endif
dbd_password = apr_pstrdup(r->pool,
apr_dbd_get_entry(dbd->driver, row, 0));
}
@@ -239,7 +238,6 @@ static authn_status authn_dbd_realm(request_rec *r, const char *user,
return AUTH_GENERAL_ERROR;
}
if (dbd_hash == NULL) {
#if APU_MAJOR_VERSION > 1 || (APU_MAJOR_VERSION == 1 && APU_MINOR_VERSION >= 3)
/* add the rest of the columns to the environment */
int i = 1;
const char *name;
@@ -264,7 +262,7 @@ static authn_status authn_dbd_realm(request_rec *r, const char *user,
apr_dbd_get_entry(dbd->driver, row, i));
i++;
}
#endif
dbd_hash = apr_pstrdup(r->pool,
apr_dbd_get_entry(dbd->driver, row, 0));
}

View File

@@ -20,15 +20,6 @@
#include "http_protocol.h"
#include "apr.h"
#include "apu_version.h"
/* apr_memcache support requires >= 1.3 */
#if APU_MAJOR_VERSION > 1 || \
(APU_MAJOR_VERSION == 1 && APU_MINOR_VERSION > 2)
#define HAVE_APU_MEMCACHE 1
#endif
#ifdef HAVE_APU_MEMCACHE
#include "ap_socache.h"
#include "ap_mpm.h"
@@ -371,8 +362,6 @@ static const ap_socache_provider_t socache_mc = {
socache_mc_iterate
};
#endif /* HAVE_APU_MEMCACHE */
static void *create_server_config(apr_pool_t *p, server_rec *s)
{
socache_mc_svr_cfg *sconf = apr_pcalloc(p, sizeof(socache_mc_svr_cfg));
@@ -407,11 +396,9 @@ static const char *socache_mc_set_ttl(cmd_parms *cmd, void *dummy,
static void register_hooks(apr_pool_t *p)
{
#ifdef HAVE_APU_MEMCACHE
ap_register_provider(p, AP_SOCACHE_PROVIDER_GROUP, "memcache",
AP_SOCACHE_PROVIDER_VERSION,
&socache_mc);
#endif
}
static const command_rec socache_memcache_cmds[] = {

View File

@@ -847,14 +847,8 @@ static const char *log_pid_tid(request_rec *r, char *a)
int tid = 0; /* APR will format "0" anyway but an arg is needed */
#endif
return apr_psprintf(r->pool,
#if APR_MAJOR_VERSION > 1 || (APR_MAJOR_VERSION == 1 && APR_MINOR_VERSION >= 2)
/* APR can format a thread id in hex */
*a == 'h' ? "%pt" : "%pT",
#else
/* APR is missing the feature, so always use decimal */
"%pT",
#endif
&tid);
*a == 'h' ? "%pt" : "%pT", &tid);
}
/* bogus format */
return a;

View File

@@ -23,11 +23,6 @@
#endif
#include "apr_version.h"
#if (APR_MAJOR_VERSION < 1)
#undef apr_socket_create
#define apr_socket_create apr_socket_create_ex
#endif
#define AUTODETECT_PWD
/* Automatic timestamping (Last-Modified header) based on MDTM is used if:
* 1) the FTP server supports the MDTM command and

View File

@@ -31,11 +31,6 @@
#include <unistd.h> /* for getpid() */
#endif
#if (APR_MAJOR_VERSION < 1)
#undef apr_socket_create
#define apr_socket_create apr_socket_create_ex
#endif
#if APR_HAVE_SYS_UN_H
#include <sys/un.h>
#endif