From: Erik Faye-Lund Date: Tue, 20 Oct 2009 12:44:10 GMT Subject: Re: [PATCH] Use faster byte swapping when compiling with MSVC Message-ID: <40aa078e0910200544i3d8aadc1ud62cf62a6964dd5@mail.gmail.com> In-Reply-To: On Tue, Oct 20, 2009 at 2:20 PM, Ludvig Strigeus wrote: > unsigned long (as used by _byteswap_ulong) is 64 bits on x64, right? Then it > doesn't make sense to use _byteswap_ulong to swap 32-bit quantities (assuming > that's what bswap32 does) would it? No, unsigned long is 32bit on x64 on Windows. --->8--- #include #include int main(int argc, char *argv[]) { printf("sizeof(void *) = %d\n", sizeof(void *)); printf("sizeof(unsigned long) = %d\n", sizeof(unsigned long)); return 0; } --->8--- sizeof(void *) = 8 sizeof(unsigned long) = 4 -- Erik "kusma" Faye-Lund