Re: printing pid_t values

2021-01-06 Thread Bruno Haible
Bernhard Voelker wrote: > > But if you want to get rid of the warnings, you are welcome to submit > > a patch that adds PRIdPID or PRIuPID to and uses it where > > it makes sense. > > I'm afraid this is beyond my current capacity. OK, then let's leave it as is. We try to get warning-free builds

Re: printing pid_t values

2021-01-06 Thread Bernhard Voelker
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 pass

Re: printing pid_t values

2021-01-06 Thread Bruno Haible
Bernhard Voelker wrote: > While pid_t is typedef'd to int on GNU/Linux platforms, it is a long on > Solaris 11: > > $ uname -a > SunOS gcc-solaris11 5.11 11.3 sun4u sparc SUNW,SPARC-Enterprise > > $ echo '#include ' | gcc -E - | grep -w pid_t > typedef long pid_t; > > There, one would n

printing pid_t values

2021-01-06 Thread Bernhard Voelker
While pid_t is typedef'd to int on GNU/Linux platforms, it is a long on Solaris 11: $ uname -a SunOS gcc-solaris11 5.11 11.3 sun4u sparc SUNW,SPARC-Enterprise $ echo '#include ' | gcc -E - | grep -w pid_t typedef long pid_t; There, one would need the %ld format when printing a pid_t's v