From a70bca224d4c00170cbcfcd44e8bd85ffe1d00bb Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Fri, 16 Dec 2016 15:43:44 +0000 Subject: [PATCH] Merge r1774602 from trunk: Use correct format pattern, "%lu" is wrong for apr_uint64_t on some platforms. Followup to r1649491. Submitted by: rjung Reviewed/backported by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1774625 13f79535-47bb-0310-9956-ffa450edef68 --- STATUS | 7 ------- modules/cache/mod_socache_memcache.c | 12 ++++++------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/STATUS b/STATUS index d044b90ef34..3c360f7d29b 100644 --- a/STATUS +++ b/STATUS @@ -118,13 +118,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - *) mod_socache_memcache: Use correct format pattern, "%lu" is wrong for - apr_uint64_t on some platforms. - Followup to r1649491 (trunk) resp. r1774016 (2.4.x). - trunk patch: http://svn.apache.org/r1774602 - 2.4.x patch: trunk works - +1: rjung, jim, ylavic - *) APR_HAVE_foo is checked via #if, not #ifdef (since it should always be defined, to either 0 or 1). This fixes a compile error on Windows introduced by r1702948. diff --git a/modules/cache/mod_socache_memcache.c b/modules/cache/mod_socache_memcache.c index 0b884e407fb..e943b9b2b82 100644 --- a/modules/cache/mod_socache_memcache.c +++ b/modules/cache/mod_socache_memcache.c @@ -318,15 +318,15 @@ static void socache_mc_status(ap_socache_instance_t *ctx, request_rec *r, int fl stats->version , stats->pointer_size, stats->pid, stats->uptime/3600); ap_rprintf(r, "Clients:: Structures: %u, Total: %u, Current: %u
\n", stats->connection_structures, stats->total_connections, stats->curr_connections); - ap_rprintf(r, "Storage:: Total Items: %u, Current Items: %u, Bytes: %lu
\n", + ap_rprintf(r, "Storage:: Total Items: %u, Current Items: %u, Bytes: %" APR_UINT64_T_FMT "
\n", stats->total_items, stats->curr_items, stats->bytes); ap_rprintf(r, "CPU:: System: %u, User: %u
\n", (unsigned)stats->rusage_system, (unsigned)stats->rusage_user ); ap_rprintf(r, "Cache:: Gets: %u, Sets: %u, Hits: %u, Misses: %u
\n", stats->cmd_get, stats->cmd_set, stats->get_hits, stats->get_misses); - ap_rprintf(r, "Net:: Input bytes: %lu, Output bytes: %lu
\n", + ap_rprintf(r, "Net:: Input bytes: %" APR_UINT64_T_FMT ", Output bytes: %" APR_UINT64_T_FMT "
\n", stats->bytes_read, stats->bytes_written); - ap_rprintf(r, "Misc:: Evictions: %lu, MaxMem: %u, Threads: %u
\n", + ap_rprintf(r, "Misc:: Evictions: %" APR_UINT64_T_FMT ", MaxMem: %u, Threads: %u
\n", stats->evictions, stats->limit_maxbytes, stats->threads); ap_rputs("

\n", r); } @@ -335,15 +335,15 @@ static void socache_mc_status(ap_socache_instance_t *ctx, request_rec *r, int fl stats->version , stats->pointer_size, stats->pid, stats->uptime/3600, br); ap_rprintf(r, "Clients:: Structures: %d, Total: %d, Current: %u %s\n", stats->connection_structures, stats->total_connections, stats->curr_connections, br); - ap_rprintf(r, "Storage:: Total Items: %u, Current Items: %u, Bytes: %lu %s\n", + ap_rprintf(r, "Storage:: Total Items: %u, Current Items: %u, Bytes: %" APR_UINT64_T_FMT " %s\n", stats->total_items, stats->curr_items, stats->bytes, br); ap_rprintf(r, "CPU:: System: %u, User: %u %s\n", (unsigned)stats->rusage_system, (unsigned)stats->rusage_user , br); ap_rprintf(r, "Cache:: Gets: %u, Sets: %u, Hits: %u, Misses: %u %s\n", stats->cmd_get, stats->cmd_set, stats->get_hits, stats->get_misses, br); - ap_rprintf(r, "Net:: Input bytes: %lu, Output bytes: %lu %s\n", + ap_rprintf(r, "Net:: Input bytes: %" APR_UINT64_T_FMT ", Output bytes: %" APR_UINT64_T_FMT " %s\n", stats->bytes_read, stats->bytes_written, br); - ap_rprintf(r, "Misc:: Evictions: %lu, MaxMem: %u, Threads: %u %s\n", + ap_rprintf(r, "Misc:: Evictions: %" APR_UINT64_T_FMT ", MaxMem: %u, Threads: %u %s\n", stats->evictions, stats->limit_maxbytes, stats->threads, br); } } -- 2.47.2