Changeset 5ac4bbe in mod_gnutls


Ignore:
Timestamp:
Dec 20, 2016, 4:37:33 PM (12 months ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
master, debian, upstream
Children:
154db29
Parents:
677754f
Message:

Use APR_SIZE_T_FMT macro for portable apr_size_t formatting

The size of the apr_size_t type depends on the architecture. "%ld"
works on 64 bit architectures, but fails to compile on 32 bit. APR
provides the correct, architecture-dependent format string in the
APR_SIZE_T_FMT macro. Example format string:

"size: %" APR_SIZE_T_FMT "\n"

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_cache.c

    r14548b9 r5ac4bbe  
    495495
    496496    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, rv, ctxt->c,
    497                   "fetched %ld bytes from cache",
     497                  "fetched %" APR_SIZE_T_FMT " bytes from cache",
    498498                  dbmval.dsize);
    499499
     
    588588
    589589    ap_log_error(APLOG_MARK, APLOG_TRACE1, rv, s,
    590                  "stored %ld bytes of data (%ld byte key) in cache '%s'",
     590                 "stored %" APR_SIZE_T_FMT " bytes of data (%"
     591                 APR_SIZE_T_FMT " byte key) in cache '%s'",
    591592                 dbmval.dsize, dbmkey.dsize, sc->cache_config);
    592593
  • src/gnutls_util.c

    r104e881 r5ac4bbe  
    2929                        "Content-Type: %s\r\n"
    3030                        "Accept: %s\r\n"
    31                         "Content-Length: %ld\r\n\r\n",
     31                        "Content-Length: %" APR_SIZE_T_FMT "\r\n\r\n",
    3232                        apr_uri_unparse(p, uri, APR_URI_UNP_OMITSITEPART),
    3333                        uri->hostname, content_type,
Note: See TracChangeset for help on using the changeset viewer.