]> Git Repo - qemu.git/commit - osdep.h
Introduce format string for pid_t
authorAndreas Färber <[email protected]>
Thu, 2 Jun 2011 17:58:06 +0000 (19:58 +0200)
committerBlue Swirl <[email protected]>
Wed, 15 Jun 2011 19:58:48 +0000 (19:58 +0000)
commit953ffe0f935f40c0d6061d69e76e0339393b54f8
tree4ccd1b5bffe7fca88063582a32653c1974a96d9e
parent1e36f6a5b573009267160edc33cb216c9621abc0
Introduce format string for pid_t

BeOS and Haiku on i386 use long for 32-bit types, including pid_t.
Using %d with pid_t therefore results in a warning.

Unfortunately POSIX:2008 does not define a PRId* string for pid_t.

In some places pid_t was previously casted to long and %ld hardcoded.
The predecessor of this patch added another upcast for the simpletrace
filename but was not applied to date.

Since new uses of pid_t with %d keep creeping in, let's instead define
an OS-dependent format string and use that consistently.

Cc: Stefan Hajnoczi <[email protected]>
Cc: Blue Swirl <[email protected]>
Cc: Ingo Weinhold <[email protected]>
Cc: Gleb Natapov <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
configure
os-posix.c
os-win32.c
osdep.h
vl.c
This page took 0.023677 seconds and 4 git commands to generate.