On 1/6/21 7:00 PM, Bruno Haible wrote: > I don't think there is an issue, because > * The pid_t values occurring on Solaris are in the 5-digit range > (> 0 and likely < 32768). > * On 32-bit platforms, 'int' and 'long' are of the same size, and on > x86_64 and sparc64 the parameter passing conventions in varargs > say that such a value is passed zero-extended or sign-extended, > and which of the two is irrelevant here.
great, thanks! > But if you want to get rid of the warnings, you are welcome to submit > a patch that adds PRIdPID or PRIuPID to <inttypes.h> and uses it where > it makes sense. I'm afraid this is beyond my current capacity. A quick search finds PRIdPID already in some Apple-related code: https://opensource.apple.com/source/Security/Security-55471/libsecurity_codesigning/lib/SecTask.c // Define PRIdPID (proper printf format string for pid_t) #define PRIdPID PRId32 FWIW: on Solaris 11, PID_MAX is defined like this: $ find /usr/include -type f -exec grep -w PID_MAX '{}' + /usr/include/limits.h:#define PID_MAX 999999 /* max value for a process ID */ Thanks again. Have a nice day, Berny