summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/aes/aes_locl.h
diff options
context:
space:
mode:
authormiod <>2014-04-17 21:17:12 +0000
committermiod <>2014-04-17 21:17:12 +0000
commitaa8f085033b21b0ec0b70c18909ba27ef8752e51 (patch)
treeda9109a7546d5e98b8647a37cc675d8b776d00ad /src/lib/libcrypto/aes/aes_locl.h
parente3644ed49258ff4a399142bf4ed0a7ba5f9bf76a (diff)
downloadopenbsd-aa8f085033b21b0ec0b70c18909ba27ef8752e51.tar.gz
openbsd-aa8f085033b21b0ec0b70c18909ba27ef8752e51.tar.bz2
openbsd-aa8f085033b21b0ec0b70c18909ba27ef8752e51.zip
Get rid of MS Visual C compiler and Intel C compiler specific defines.
Diffstat (limited to 'src/lib/libcrypto/aes/aes_locl.h')
-rw-r--r--src/lib/libcrypto/aes/aes_locl.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/lib/libcrypto/aes/aes_locl.h b/src/lib/libcrypto/aes/aes_locl.h
index 054b442d41..1d0e86331e 100644
--- a/src/lib/libcrypto/aes/aes_locl.h
+++ b/src/lib/libcrypto/aes/aes_locl.h
@@ -62,14 +62,8 @@
62#include <stdlib.h> 62#include <stdlib.h>
63#include <string.h> 63#include <string.h>
64 64
65#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64)) 65#define GETU32(pt) (((u32)(pt)[0] << 24) ^ ((u32)(pt)[1] << 16) ^ ((u32)(pt)[2] << 8) ^ ((u32)(pt)[3]))
66# define SWAP(x) (_lrotl(x, 8) & 0x00ff00ff | _lrotr(x, 8) & 0xff00ff00) 66#define PUTU32(ct, st) { (ct)[0] = (u8)((st) >> 24); (ct)[1] = (u8)((st) >> 16); (ct)[2] = (u8)((st) >> 8); (ct)[3] = (u8)(st); }
67# define GETU32(p) SWAP(*((u32 *)(p)))
68# define PUTU32(ct, st) { *((u32 *)(ct)) = SWAP((st)); }
69#else
70# define GETU32(pt) (((u32)(pt)[0] << 24) ^ ((u32)(pt)[1] << 16) ^ ((u32)(pt)[2] << 8) ^ ((u32)(pt)[3]))
71# define PUTU32(ct, st) { (ct)[0] = (u8)((st) >> 24); (ct)[1] = (u8)((st) >> 16); (ct)[2] = (u8)((st) >> 8); (ct)[3] = (u8)(st); }
72#endif
73 67
74#ifdef AES_LONG 68#ifdef AES_LONG
75typedef unsigned long u32; 69typedef unsigned long u32;