]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1897325, r1897326, r1897329, r1898255 from trunk
authorChristophe Jaillet <jailletc36@apache.org>
Thu, 24 Feb 2022 20:43:21 +0000 (20:43 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Thu, 24 Feb 2022 20:43:21 +0000 (20:43 +0000)
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

modules/aaa/mod_authn_dbd.c
modules/cache/mod_socache_memcache.c
modules/loggers/mod_log_config.c
modules/proxy/mod_proxy_ftp.c
modules/proxy/proxy_util.c

index 57090d276151c80885c5d81ad4f96c892f46601b..08e5993b9715d850c7b1388b0a40241df13ed859 100644 (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));
         }
index e943b9b2b822d385a2fb81afdb82d576ba35277f..f122ba4e82096d69596d340c924fd19d0fc9b473 100644 (file)
 #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[] = {
index aba01f2ef3ffa7f1c586f1ce9f59ea50f78d2197..5d5b73a1f5da84914918f482a3cea5cc2cb4c02e 100644 (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;
index a559528f63ea48f9f84f8e1c31e7e0b2cc4f9e4f..3237a2ba85832d78b5ce55b5a68cc1070010377c 100644 (file)
 #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
index 8cb315d9103e91e515234c781b2a0f26d66c9a7b..b8f77119789865a9a133633cf3aefb1280b57dc2 100644 (file)
 #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