Skip to content

Commit

Permalink
Merge pull request #519 from InfoHunter/8.3-stable
Browse files Browse the repository at this point in the history
Resolve __has_include operator issue
  • Loading branch information
InfoHunter authored Nov 14, 2023
2 parents f5e1858 + 471730c commit 6a4ad4d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions include/crypto/sm4.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,15 @@ void SM4_encrypt(const uint8_t *in, uint8_t *out, const SM4_KEY *ks);
* You can't use MSVC to build this feature since it has no 'x86intrin.h'.
*/
# ifndef OPENSSL_NO_SM4_NI
# if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__)
# if defined (__has_include) && (__has_include(<x86intrin.h>))
# include <x86intrin.h>
# if defined(__SSE__) && defined(__SSE2__) && defined(__SSE3__) && defined(__AES__)
# define USE_SM4_NI
# if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__)
# if defined __has_include
# if __has_include(<x86intrin.h>)
# include <x86intrin.h>
# if defined(__SSE__) && defined(__SSE2__) && defined(__SSE3__) && defined(__AES__)
# define USE_SM4_NI
void SM4_encrypt_affine_ni(const uint8_t *in, uint8_t *out,
const SM4_KEY *ks);
# endif
# endif
# endif
# endif
Expand Down

0 comments on commit 6a4ad4d

Please sign in to comment.