diff options
author | John-Mark Bell <jmb@netsurf-browser.org> | 2022-06-03 02:34:22 +0100 |
---|---|---|
committer | John-Mark Bell <jmb@netsurf-browser.org> | 2022-06-03 02:34:22 +0100 |
commit | 69adc31d07f3b5b9cdfa1482efc00d18f4c21583 (patch) | |
tree | c0877c3d43be483b162f04c076e62e58ac55fe80 /include | |
parent | bfce4632b88c6386fa527509b91ad97ebcc6b1a4 (diff) | |
download | netsurf-69adc31d07f3b5b9cdfa1482efc00d18f4c21583.tar.gz netsurf-69adc31d07f3b5b9cdfa1482efc00d18f4c21583.tar.bz2 |
inttypes: custom format for UnixLib ssize_t
UnixLib defines ssize_t to be a long int, which forces the
corresponding format string to need to be %ld to avoid compiler
warnings. Making this change uncovered a number of places where
we were using the wrong format specifier entirely (namely
PRIssizet where we meant PRIsizet). Fix these, too.
Diffstat (limited to 'include')
-rw-r--r-- | include/netsurf/inttypes.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/netsurf/inttypes.h b/include/netsurf/inttypes.h index 3a16d0ef1..e2229085a 100644 --- a/include/netsurf/inttypes.h +++ b/include/netsurf/inttypes.h @@ -52,8 +52,13 @@ /** c99 standard printf formatting for size_t type */ #define PRIsizet "zu" +#if defined(__riscos__) +/** riscos/unixlib defines ssize_t as a long int */ +#define PRIssizet "ld" +#else /** c99 standard printf formatting for ssize_t type */ #define PRIssizet "zd" +#endif #endif |