summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
Diffstat (limited to 'strings')
-rw-r--r--strings/apr_snprintf.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/strings/apr_snprintf.c b/strings/apr_snprintf.c
index 313a778cf..e903d2d31 100644
--- a/strings/apr_snprintf.c
+++ b/strings/apr_snprintf.c
@@ -21,6 +21,7 @@
#include "apr_strings.h"
#include "apr_network_io.h"
#include "apr_portable.h"
+#include "apr_errno.h"
#include <math.h>
#if APR_HAVE_CTYPE_H
#include <ctype.h>
@@ -1166,6 +1167,24 @@ APR_DECLARE(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
}
break;
+ /* print the error for an apr_status_t */
+ case 'm':
+ {
+ apr_status_t *mrv;
+
+ mrv = va_arg(ap, apr_status_t *);
+ if (mrv != NULL) {
+ s = apr_strerror(*mrv, num_buf, NUM_BUF_SIZE-1);
+ s_len = strlen(s);
+ }
+ else {
+ s = S_NULL;
+ s_len = S_NULL_LEN;
+ }
+ pad_char = ' ';
+ }
+ break;
+
case 'T':
#if APR_HAS_THREADS
{