diff options
author | Graham Leggett <minfrin@apache.org> | 2024-08-19 08:52:35 +0200 |
---|---|---|
committer | Graham Leggett <minfrin@apache.org> | 2024-08-19 08:52:35 +0200 |
commit | fe4ade610c750d63c3bbfe0d07c5a37f2d5cb9f0 (patch) | |
tree | c4bb117477db952cde234d15a64f1ccbd95e35f2 /server | |
parent | don't merge slashes on perdir prefix (diff) | |
download | apache2-fe4ade610c750d63c3bbfe0d07c5a37f2d5cb9f0.tar.xz apache2-fe4ade610c750d63c3bbfe0d07c5a37f2d5cb9f0.zip |
ap_log_error: Include text strings from apr-util in addition
to apr.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1920013 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r-- | server/log.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/server/log.c b/server/log.c index 1777a64615..f745cb4758 100644 --- a/server/log.c +++ b/server/log.c @@ -25,6 +25,9 @@ #include "apr_general.h" /* for signal stuff */ #include "apr_strings.h" #include "apr_errno.h" +#if (APU_MAJOR_VERSION == 1 && APU_MINOR_VERSION >= 7) +#include "apu_errno.h" +#endif #include "apr_thread_proc.h" #include "apr_lib.h" #include "apr_signal.h" @@ -720,7 +723,19 @@ static int log_apr_status(const ap_errorlog_info *info, const char *arg, len = apr_snprintf(buf, buflen, "(os 0x%08x)", status - APR_OS_START_SYSERR); } +#if (APU_MAJOR_VERSION == 1 && APU_MINOR_VERSION >= 7) + if (status < APR_UTIL_START_STATUS) { + apr_strerror(status, buf + len, buflen - len); + } + else if (status < (APR_UTIL_START_STATUS + APR_UTIL_ERRSPACE_SIZE)) { + apu_strerror(status, buf + len, buflen - len); + } + else { + apr_strerror(status, buf + len, buflen - len); + } +#else apr_strerror(status, buf + len, buflen - len); +#endif len += strlen(buf + len); return len; } |