Re: [Qemu-devel] [PATCH] trace/simple: Fix warning and wrong trace file name for MinGW

2015-09-28 Thread Stefan Weil
Am 28.09.2015 um 17:50 schrieb Eric Blake: > On 09/28/2015 09:19 AM, Stefan Weil wrote: >> Am 28.09.2015 um 17:06 schrieb Eric Blake: >>> On 09/28/2015 02:26 AM, Stefan Weil wrote: >>> > Can you explain why osdep.h's > > #define FMT_pid "%" PRId64 > > is appropriate for Wind

Re: [Qemu-devel] [PATCH] trace/simple: Fix warning and wrong trace file name for MinGW

2015-09-28 Thread Eric Blake
On 09/28/2015 09:19 AM, Stefan Weil wrote: > Am 28.09.2015 um 17:06 schrieb Eric Blake: >> On 09/28/2015 02:26 AM, Stefan Weil wrote: >> Can you explain why osdep.h's #define FMT_pid "%" PRId64 is appropriate for Windows? >>> Don't blame me for any strangeness which you

Re: [Qemu-devel] [PATCH] trace/simple: Fix warning and wrong trace file name for MinGW

2015-09-28 Thread Stefan Weil
Am 28.09.2015 um 17:06 schrieb Eric Blake: > On 09/28/2015 02:26 AM, Stefan Weil wrote: > >>> Can you explain why osdep.h's >>> >>> #define FMT_pid "%" PRId64 >>> >>> is appropriate for Windows? >> Don't blame me for any strangeness which you might find in Windows. :-) >> >> Mingw-w64 sys/types

Re: [Qemu-devel] [PATCH] trace/simple: Fix warning and wrong trace file name for MinGW

2015-09-28 Thread Eric Blake
On 09/28/2015 02:26 AM, Stefan Weil wrote: >> Can you explain why osdep.h's >> >> #define FMT_pid "%" PRId64 >> >> is appropriate for Windows? > > Don't blame me for any strangeness which you might find in Windows. :-) > > Mingw-w64 sys/types.h defines pid_t to be either an int or an __int64

Re: [Qemu-devel] [PATCH] trace/simple: Fix warning and wrong trace file name for MinGW

2015-09-28 Thread Stefan Weil
Am 28.09.2015 um 09:00 schrieb Markus Armbruster: > Stefan Weil writes: > >> On Windows, getpid() always returns an int value, but pid_t (which is >> expected by the format string) is either a 32 bit or a 64 bit value. >> >> Without a type cast (or a modified format string), the compiler prints >>

Re: [Qemu-devel] [PATCH] trace/simple: Fix warning and wrong trace file name for MinGW

2015-09-28 Thread Markus Armbruster
Stefan Weil writes: > On Windows, getpid() always returns an int value, but pid_t (which is > expected by the format string) is either a 32 bit or a 64 bit value. > > Without a type cast (or a modified format string), the compiler prints > a warning when building for 64 bit Windows and the result

[Qemu-devel] [PATCH] trace/simple: Fix warning and wrong trace file name for MinGW

2015-09-25 Thread Stefan Weil
On Windows, getpid() always returns an int value, but pid_t (which is expected by the format string) is either a 32 bit or a 64 bit value. Without a type cast (or a modified format string), the compiler prints a warning when building for 64 bit Windows and the resulting trace_file_name will includ