Various mingw64 fixes.

This commit is contained in:
Andy Polyakov 2011-05-29 13:51:14 +00:00
parent afa4b38671
commit fe9a5107be
3 changed files with 13 additions and 9 deletions

View File

@ -176,7 +176,7 @@ static int aesni_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
#define AESNI_MIN_ALIGN 16
#define AESNI_ALIGN(x) \
((void *)(((unsigned long)(x)+AESNI_MIN_ALIGN-1)&~(AESNI_MIN_ALIGN-1)))
((void *)(((size_t)(x)+AESNI_MIN_ALIGN-1)&~(AESNI_MIN_ALIGN-1)))
/* Engine names */
static const char aesni_id[] = "aesni",

View File

@ -119,6 +119,7 @@ $out="%rcx"; # arg4
{
$code=<<___;
.text
.extern OPENSSL_ia32cap_P
.globl RC4
.type RC4,\@function,4
@ -425,7 +426,6 @@ $idx="%r8";
$ido="%r9";
$code.=<<___;
.extern OPENSSL_ia32cap_P
.globl RC4_set_key
.type RC4_set_key,\@function,3
.align 16

View File

@ -63,13 +63,17 @@
#include <openssl/evp.h>
#if (BN_BYTES == 8)
#define bn_pack4(a1,a2,a3,a4) 0x##a1##a2##a3##a4##ul
#endif
#if (BN_BYTES == 4)
#define bn_pack4(a1,a2,a3,a4) 0x##a3##a4##ul, 0x##a1##a2##ul
#endif
#if (BN_BYTES == 2)
#define bn_pack4(a1,a2,a3,a4) 0x##a4##u,0x##a3##u,0x##a2##u,0x##a1##u
# if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
# define bn_pack4(a1,a2,a3,a4) 0x##a1##a2##a3##a4##UI64
# elif defined(__arch64__)
# define bn_pack4(a1,a2,a3,a4) 0x##a1##a2##a3##a4##UL
# else
# define bn_pack4(a1,a2,a3,a4) 0x##a1##a2##a3##a4##ULL
# endif
#elif (BN_BYTES == 4)
# define bn_pack4(a1,a2,a3,a4) 0x##a3##a4##UL, 0x##a1##a2##UL
#else
# error "unsupported BN_BYTES"
#endif