[LLVMdev] ssize_t definition in DataTypes.h
Michael.Smith at synopsys.com
Thu Apr 1 18:29:13 PDT 2010
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:
typedef __int64 ssize_t;
typedef _w64 int ssize_t;
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(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
# define _W64 __w64
# define _W64
would be needed.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev