From 69adc31d07f3b5b9cdfa1482efc00d18f4c21583 Mon Sep 17 00:00:00 2001 From: John-Mark Bell Date: Fri, 3 Jun 2022 02:34:22 +0100 Subject: 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. --- include/netsurf/inttypes.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') 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 -- cgit v1.2.1