On 03/01/2016 11:54 AM, Stefan Weil wrote: > Am 01.03.2016 um 17:31 schrieb Adrien Nader: >> Hi, >> >> I poked Kaï on IRC about that; here's the log (very slightly reformatted): >> >>> Well, I admit that I know that pid_t is on standard sdk just a 32-bit value. >>> Nevertheless there is a lot of software in FOSS, which assumes that pid_t >>> has >>> actually the width of a pointer, and so we decided to make pidt_t on Windows >>> 64-bit.
That feels wrong. pid_t should be the same width as whatever gets returned by getpid(), NOT the same as void*. I'd rather fix broken FOSS that incorrectly tries to treat pid_t and void* as synonyms than create a worse situation by making pid_t incompatible with its real use. >>> Nevertheless assuming that pid_t is an int, is also wrong on Windows. >>> It is actually a DWORD. See GetThreadId (or something like that is the API >>> of >>> Win32). Isn't sizeof(DWORD) == sizeof(int) for both 32- and 64-bit Windows? If so, then there's your answer - pid_t should be 32-bit. >>> So negative values are nothing to be concerned about at all. Not for a process id, but there are other interfaces which REQUIRE pid_t to have negative values to operate on an entire process group. Whether those interfaces can be mapped to Windows is a different question, but pid_t itself needs to be correctly typed for what you DO map to Windows. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
