diff options
author | miod <> | 2014-04-17 21:17:12 +0000 |
---|---|---|
committer | miod <> | 2014-04-17 21:17:12 +0000 |
commit | aa8f085033b21b0ec0b70c18909ba27ef8752e51 (patch) | |
tree | da9109a7546d5e98b8647a37cc675d8b776d00ad /src/lib/libcrypto/aes/aes_locl.h | |
parent | e3644ed49258ff4a399142bf4ed0a7ba5f9bf76a (diff) | |
download | openbsd-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.h | 10 |
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 |
75 | typedef unsigned long u32; | 69 | typedef unsigned long u32; |