1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-20 10:37:24 -07:00

Pretend Visual Studio has <emmintrin.h>

This commit is contained in:
Frank Denis 2014-05-08 20:26:45 -07:00
parent 4ebbd0d992
commit b2c5deccdd
2 changed files with 3 additions and 3 deletions

View File

@ -153,7 +153,7 @@ escrypt_r(escrypt_local_t * local, const uint8_t * passwd, size_t passwdlen,
if (need > buflen || need < saltlen) { if (need > buflen || need < saltlen) {
return NULL; return NULL;
} }
#ifdef HAVE_EMMINTRIN_H #if defined(HAVE_EMMINTRIN_H) || defined(_MSC_VER)
escrypt_kdf = escrypt_kdf =
sodium_runtime_has_sse2() ? escrypt_kdf_sse : escrypt_kdf_nosse; sodium_runtime_has_sse2() ? escrypt_kdf_sse : escrypt_kdf_nosse;
#else #else
@ -234,7 +234,7 @@ crypto_scrypt_compat(const uint8_t * passwd, size_t passwdlen,
if (escrypt_init_local(&local)) { if (escrypt_init_local(&local)) {
return -1; return -1;
} }
#ifdef HAVE_EMMINTRIN_H #if defined(HAVE_EMMINTRIN_H) || defined(_MSC_VER)
escrypt_kdf = escrypt_kdf =
sodium_runtime_has_sse2() ? escrypt_kdf_sse : escrypt_kdf_nosse; sodium_runtime_has_sse2() ? escrypt_kdf_sse : escrypt_kdf_nosse;
#else #else

View File

@ -28,7 +28,7 @@
* online backup system. * online backup system.
*/ */
#ifdef HAVE_EMMINTRIN_H #if defined(HAVE_EMMINTRIN_H) || defined(_MSC_VER)
#pragma GCC target("sse2") #pragma GCC target("sse2")
#include <emmintrin.h> #include <emmintrin.h>
#if defined(__XOP__) && defined(DISABLED) #if defined(__XOP__) && defined(DISABLED)