Subject: Re: Visual Studio 6 compilation issues (libssh2 1.2.4)

Re: Visual Studio 6 compilation issues (libssh2 1.2.4)

From: Dave McCaldon <davem_at_intersystems.com>
Date: Tue, 9 Mar 2010 14:27:59 -0500

On Mar 9, 2010, at 1:08 PM, Peter Stuge wrote:

> Neil Gierman wrote:
>> in Win64 builds, size_t = unsigned __int64. Long = 4 bytes,
>> __int64 = 8bytes
>> (http://msdn.microsoft.com/en-us/library/s3f49ktz(VS.80).aspx).
>
> unsigned long used to be *the* way to get the maximum length
> CPU-native data type, until 64-bit Windows.. Thanks, Microsoft. :(

__int64 has been around for a while (even on 32-bit systems), I don't know why they didn't just use "long long" like everyone else. I guess when they went to 64-bit, they didn't want to break all of the badly written code that presumed a long was 32-bits. I guess that makes it a LLP64 platform:

http://www.unix.org/version2/whatsnew/lp64_wp.html

> I'm not sure if we can deal with it without changing the API?

Most sane 64-bit systems are LP64, so it's likely that size_t == unsigned long. The same should be true for most 32-bit systems, size_t == unsigned long.

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-03-09