[cfe-dev] [libcxx] random_device for Windows needs more storage

David Chisnall David.Chisnall at cl.cam.ac.uk
Tue Oct 8 01:32:18 PDT 2013


On 7 Oct 2013, at 21:20, Yaron Keren <yaron.keren at gmail.com> wrote:

> Looking in the MingW header file basestd.h, ULONG_PTR is defined to either __int64 in WIN64 or long in WIN32, so it is always 64 bit.

Did I miss something?  Long is 32-bits on win32 (and on win64, which breaks a lot of code that assumes that you can round trip pointers through long, because even though the standard has never guaranteed this it's been possible on pretty much every system that isn't an IBM mainframe for decades).  On Win32, long is the size of a pointer, on Win64, __int64 is the size of a pointer.

David






More information about the cfe-dev mailing list