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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ramsay Jones wrote:

> 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__)

Looks good to me, for what it’s worth.  You might want a similar
change on line 57:

 
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(__i386__) || defined(__x86_64__) || \
+	defined(_M_IX86) || defined(_M_X64)
   #define setW(x, val) (*(volatile unsigned int *)&W(x) = (val))

Or alternatively, it might make sense to add something like the
following to compat/mingw.h or git-compat-util.h to fix this once.

 #if defined(_M_IX86) && !defined(__i386__)
 # define __i386__
 #endif
 #if defined(_M_X64) && !defined (__x86_64__)
 # define __x86_64__
 #endif

Thanks,
Jonathan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]