ssize_t definition in DataTypes.h

LLVM doesn’t look completely 64-bit capable on Windows. One problem I see is in DataTypes.h where ssize_t is defined for Windows.

My understanding is in general, ssize_t is a 32-bit integer on 32-bit machines, and a 64-bit integer on 64-bit machines. So for Windows, this type definition should vary for 32 and 64-bit machines.

A potential implementation would be:

#ifdef _WIN64

typedef __int64 ssize_t;

#else

typedef _w64 int ssize_t;

#endif

A discussion of “_w64” - http://msdn.microsoft.com/en-us/library/s04b5w00(VS.71).aspx. It’s only supported on later versions of Visual Studio, so something like

#if !defined(_W64)

if !defined(__midl) && (defined(X86) || defined(_M_IX86)) && _MSC_VER >= 1300

define _W64 __w64

else

define _W64

endif

#endif

would be needed.

Regards,

Michael Smith