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

[PATCH 2/4] msvc: Select the "fast" definition of the {get,put}_be32() macros

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Jun 23, 2010, 19:47 UTC
Message-ID
<4C2264B6.5010906@ramsay1.demon.co.uk>

On Intel machines, the msvc compiler defines the CPU architecture macros _M_IX86 and _M_X64 (equivalent to __i386__ and __x86_64__ respectively). Use these macros in the pre-processor expression to select the "fast" definition of the {get,put}_be32() macros.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
I did consider adding an additional guard, like so:
    (defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))) || \
However, I decided that the extra paranoia was not needed ...
 block-sha1/sha1.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/block-sha1/sha1.c b/block-sha1/sha1.c
index d893475..e102856 100644
--- a/block-sha1/sha1.c
+++ b/block-sha1/sha1.c
@@ -70,6 +70,7 @@
  */
 
 #if defined(__i386__) || defined(__x86_64__) || \
+    defined(_M_IX86) || defined(_M_X64) || \
     defined(__ppc__) || defined(__ppc64__) || \
     defined(__powerpc__) || defined(__powerpc64__) || \
     defined(__s390__) || defined(__s390x__)
-- 
1.7.1
Next: Jonathan Nieder
Message 1 of 5 in “msvc: Select the "fast" definition of the {get,put}_be32() macros”
  1. 2/4 msvc: Select the "fast" definition of the {get,put}_be32() macrosRamsay Jones, Jun 23, 2010
  2. Jonathan NiederJun 24, 2010
  3. Ramsay JonesJun 25, 2010
  4. Jonathan NiederJun 26, 2010
  5. Ramsay JonesJun 30, 2010

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.