git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Use faster byte swapping when compiling with MSVC

From
Erik Faye-Lund <kusmabite@googlemail.com>
Date
Oct 20, 2009, 12:44 UTC
Message-ID
<40aa078e0910200544i3d8aadc1ud62cf62a6964dd5@mail.gmail.com>
In-Reply-To
<loom.20091020T141138-782@post.gmane.org>
On Tue, Oct 20, 2009 at 2:20 PM, Ludvig Strigeus <ludde@spotify.com> 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 <stdio.h> #include <stdlib.h>

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
Previous: Ludvig Strigeus
Message 7 of 7 in “Use faster byte swapping when compiling with MSVC”
  1. Use faster byte swapping when compiling with MSVCSebastian Schuberth, Oct 19, 2009
  2. Junio C HamanoOct 20, 2009
  3. Sebastian SchuberthOct 20, 2009
  4. Johannes SchindelinOct 20, 2009
  5. Junio C HamanoOct 20, 2009
  6. Ludvig StrigeusOct 20, 2009
  7. Erik Faye-LundOct 20, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.