qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [Qemu-devel] [PATCH] trace/simple: Fix warning and wr


From: Stefan Weil
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] trace/simple: Fix warning and wrong trace file name for MinGW
Date: Mon, 28 Sep 2015 21:55:09 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0

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 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.
>>>> FMT_pid must match these definitions.
>>>>
>>>> But getpid returns an int, not a pid_t...
>>> Can we 1) file a bug against mingw for their buggy getpid(), and 2)
>>> write a wrapper that makes getpid() always return pid_t in the meantime?
>>
>> 1) No, because MinGW and Mingw-w64 use the same declaration as MS.
>> They cannot change that, of course. Nor will MS correct this after many
>> years, for obvious reasons.
> 
> If getpid() always returns int, then defining pid_t to __int64 feels
> wrong.  I still claim its a mingw bug to have a mismatch in types.
> 

I have sent this question to address@hidden

Stefan


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]