diff options
author | Vincent Sanders <vince@kyllikki.org> | 2016-03-17 21:55:12 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2016-03-17 22:00:54 +0000 |
commit | d15ab96a51287469082e8d9068e2608a386f9e5f (patch) | |
tree | 346fb22044567be929d9f0dc47f62732f4633815 /content/fetchers/data.c | |
parent | 232cda5317ae39d54852f741fbbd09c9618143cd (diff) | |
download | netsurf-d15ab96a51287469082e8d9068e2608a386f9e5f.tar.gz netsurf-d15ab96a51287469082e8d9068e2608a386f9e5f.tar.bz2 |
Fix size_t printf formatting
The printf formatting for size_t is set in c99 as %zu but in windows
it is %Iu this is solved by adding and inttypes style PRI macro for size_t
This also uses this macro everywhere size_t is formatted.
Diffstat (limited to 'content/fetchers/data.c')
-rw-r--r-- | content/fetchers/data.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/content/fetchers/data.c b/content/fetchers/data.c index 00494ccc7..6c18911e2 100644 --- a/content/fetchers/data.c +++ b/content/fetchers/data.c @@ -263,7 +263,8 @@ static void fetch_data_poll(lwc_string *scheme) char header[64]; fetch_set_http_code(c->parent_fetch, 200); - LOG("setting data: MIME type to %s, length to %zd", c->mimetype, c->datalen); + LOG("setting data: MIME type to %s, length to %" PRIsizet, + c->mimetype, c->datalen); /* Any callback can result in the fetch being aborted. * Therefore, we _must_ check for this after _every_ * call to fetch_data_send_callback(). @@ -277,8 +278,8 @@ static void fetch_data_poll(lwc_string *scheme) if (c->aborted == false) { snprintf(header, sizeof header, - "Content-Length: %"SSIZET_FMT, - c->datalen); + "Content-Length: %" PRIsizet, + c->datalen); msg.type = FETCH_HEADER; msg.data.header_or_data.buf = (const uint8_t *) header; |