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;


typedef _w64 int ssize_t;


A discussion of “_w64” - 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


define _W64



would be needed.


Michael Smith