Thread (5 messages) flat view 5 messages, 2 authors, 2016-06-15
STALE3737d

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

From: Ramsay Jones <hidden>
Date: 2016-06-15 22:48:59
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help