diff options
author | miod <> | 2014-04-23 19:09:49 +0000 |
---|---|---|
committer | miod <> | 2014-04-23 19:09:49 +0000 |
commit | ba54475bcdd808f5501d943b18017bccbabd7bf5 (patch) | |
tree | 2f0bbc95834194b0eb3a2e2149c853e29107e563 /src | |
parent | 7386fc3d9177d598eb0bcef6e82db575c9472048 (diff) | |
download | openbsd-ba54475bcdd808f5501d943b18017bccbabd7bf5.tar.gz openbsd-ba54475bcdd808f5501d943b18017bccbabd7bf5.tar.bz2 openbsd-ba54475bcdd808f5501d943b18017bccbabd7bf5.zip |
Unifdef -UPEDANTIC. ok beck@ tedu@
Diffstat (limited to 'src')
39 files changed, 70 insertions, 221 deletions
diff --git a/src/lib/libcrypto/asn1/n_pkey.c b/src/lib/libcrypto/asn1/n_pkey.c index 5c6181b04c..078caf8a15 100644 --- a/src/lib/libcrypto/asn1/n_pkey.c +++ b/src/lib/libcrypto/asn1/n_pkey.c | |||
@@ -335,10 +335,4 @@ err: | |||
335 | 335 | ||
336 | #endif /* OPENSSL_NO_RC4 */ | 336 | #endif /* OPENSSL_NO_RC4 */ |
337 | 337 | ||
338 | #else /* !OPENSSL_NO_RSA */ | ||
339 | |||
340 | # if PEDANTIC | ||
341 | static void *dummy = &dummy; | ||
342 | # endif | ||
343 | |||
344 | #endif | 338 | #endif |
diff --git a/src/lib/libcrypto/bn/bn_div.c b/src/lib/libcrypto/bn/bn_div.c index 7817c345f0..871f29e34f 100644 --- a/src/lib/libcrypto/bn/bn_div.c +++ b/src/lib/libcrypto/bn/bn_div.c | |||
@@ -128,7 +128,7 @@ int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d, | |||
128 | #else | 128 | #else |
129 | 129 | ||
130 | #if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) \ | 130 | #if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) \ |
131 | && !defined(PEDANTIC) && !defined(BN_DIV3W) | 131 | && !defined(BN_DIV3W) |
132 | # if defined(__GNUC__) && __GNUC__>=2 | 132 | # if defined(__GNUC__) && __GNUC__>=2 |
133 | # if defined(__i386) || defined (__i386__) | 133 | # if defined(__i386) || defined (__i386__) |
134 | /* | 134 | /* |
diff --git a/src/lib/libcrypto/bn/bn_lcl.h b/src/lib/libcrypto/bn/bn_lcl.h index 1208deb3cf..22b4d17eb6 100644 --- a/src/lib/libcrypto/bn/bn_lcl.h +++ b/src/lib/libcrypto/bn/bn_lcl.h | |||
@@ -210,7 +210,7 @@ extern "C" { | |||
210 | #define BN_MUL_LOW_RECURSIVE_SIZE_NORMAL (32) /* 32 */ | 210 | #define BN_MUL_LOW_RECURSIVE_SIZE_NORMAL (32) /* 32 */ |
211 | #define BN_MONT_CTX_SET_SIZE_WORD (64) /* 32 */ | 211 | #define BN_MONT_CTX_SET_SIZE_WORD (64) /* 32 */ |
212 | 212 | ||
213 | #if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) && !defined(PEDANTIC) | 213 | #if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
214 | /* | 214 | /* |
215 | * BN_UMULT_HIGH section. | 215 | * BN_UMULT_HIGH section. |
216 | * | 216 | * |
diff --git a/src/lib/libcrypto/camellia/camellia.c b/src/lib/libcrypto/camellia/camellia.c index 44c4202c2b..2c02466564 100644 --- a/src/lib/libcrypto/camellia/camellia.c +++ b/src/lib/libcrypto/camellia/camellia.c | |||
@@ -87,7 +87,7 @@ | |||
87 | #include <stdlib.h> | 87 | #include <stdlib.h> |
88 | 88 | ||
89 | /* 32-bit rotations */ | 89 | /* 32-bit rotations */ |
90 | #if !defined(PEDANTIC) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) | 90 | #if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
91 | # if defined(__GNUC__) && __GNUC__>=2 | 91 | # if defined(__GNUC__) && __GNUC__>=2 |
92 | # if defined(__i386) || defined(__x86_64) | 92 | # if defined(__i386) || defined(__x86_64) |
93 | # define RightRotate(x,s) ({u32 ret; asm ("rorl %1,%0":"=r"(ret):"I"(s),"0"(x):"cc"); ret; }) | 93 | # define RightRotate(x,s) ({u32 ret; asm ("rorl %1,%0":"=r"(ret):"I"(s),"0"(x):"cc"); ret; }) |
diff --git a/src/lib/libcrypto/des/des_locl.h b/src/lib/libcrypto/des/des_locl.h index bbae457377..00fcd2a8ac 100644 --- a/src/lib/libcrypto/des/des_locl.h +++ b/src/lib/libcrypto/des/des_locl.h | |||
@@ -152,7 +152,7 @@ | |||
152 | } \ | 152 | } \ |
153 | } | 153 | } |
154 | 154 | ||
155 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(__STRICT_ANSI__) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) && !defined(PEDANTIC) | 155 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(__STRICT_ANSI__) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
156 | # if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) | 156 | # if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) |
157 | # define ROTATE(a,n) ({ register unsigned int ret; \ | 157 | # define ROTATE(a,n) ({ register unsigned int ret; \ |
158 | asm ("rorl %1,%0" \ | 158 | asm ("rorl %1,%0" \ |
diff --git a/src/lib/libcrypto/evp/e_aes_cbc_hmac_sha1.c b/src/lib/libcrypto/evp/e_aes_cbc_hmac_sha1.c index fb2c884a78..4d76ec74d2 100644 --- a/src/lib/libcrypto/evp/e_aes_cbc_hmac_sha1.c +++ b/src/lib/libcrypto/evp/e_aes_cbc_hmac_sha1.c | |||
@@ -90,7 +90,7 @@ typedef struct | |||
90 | defined(_M_AMD64) || defined(_M_X64) || \ | 90 | defined(_M_AMD64) || defined(_M_X64) || \ |
91 | defined(__INTEL__) ) | 91 | defined(__INTEL__) ) |
92 | 92 | ||
93 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(PEDANTIC) | 93 | #if defined(__GNUC__) && __GNUC__>=2 |
94 | # define BSWAP(x) ({ unsigned int r=(x); asm ("bswapl %0":"=r"(r):"0"(r)); r; }) | 94 | # define BSWAP(x) ({ unsigned int r=(x); asm ("bswapl %0":"=r"(r):"0"(r)); r; }) |
95 | #endif | 95 | #endif |
96 | 96 | ||
diff --git a/src/lib/libcrypto/evp/e_camellia.c b/src/lib/libcrypto/evp/e_camellia.c index a7b40d1c60..8bb7c320d3 100644 --- a/src/lib/libcrypto/evp/e_camellia.c +++ b/src/lib/libcrypto/evp/e_camellia.c | |||
@@ -122,10 +122,4 @@ static int camellia_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | |||
122 | return 1; | 122 | return 1; |
123 | } | 123 | } |
124 | 124 | ||
125 | #else | ||
126 | |||
127 | # ifdef PEDANTIC | ||
128 | static void *dummy=&dummy; | ||
129 | # endif | ||
130 | |||
131 | #endif | 125 | #endif |
diff --git a/src/lib/libcrypto/evp/p_open.c b/src/lib/libcrypto/evp/p_open.c index 2a5ab2b6cc..b832ec6a6b 100644 --- a/src/lib/libcrypto/evp/p_open.c +++ b/src/lib/libcrypto/evp/p_open.c | |||
@@ -119,10 +119,4 @@ int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | |||
119 | i = EVP_DecryptInit_ex(ctx,NULL,NULL,NULL,NULL); | 119 | i = EVP_DecryptInit_ex(ctx,NULL,NULL,NULL,NULL); |
120 | return(i); | 120 | return(i); |
121 | } | 121 | } |
122 | #else /* !OPENSSL_NO_RSA */ | ||
123 | |||
124 | # ifdef PEDANTIC | ||
125 | static void *dummy=&dummy; | ||
126 | # endif | ||
127 | |||
128 | #endif | 122 | #endif |
diff --git a/src/lib/libcrypto/md32_common.h b/src/lib/libcrypto/md32_common.h index be097bfc70..7e25b2ad3b 100644 --- a/src/lib/libcrypto/md32_common.h +++ b/src/lib/libcrypto/md32_common.h | |||
@@ -141,16 +141,15 @@ | |||
141 | * Engage compiler specific rotate intrinsic function if available. | 141 | * Engage compiler specific rotate intrinsic function if available. |
142 | */ | 142 | */ |
143 | #undef ROTATE | 143 | #undef ROTATE |
144 | #ifndef PEDANTIC | 144 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
145 | # if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) | ||
146 | /* | 145 | /* |
147 | * Some GNU C inline assembler templates. Note that these are | 146 | * Some GNU C inline assembler templates. Note that these are |
148 | * rotates by *constant* number of bits! But that's exactly | 147 | * rotates by *constant* number of bits! But that's exactly |
149 | * what we need here... | 148 | * what we need here... |
150 | * <appro@fy.chalmers.se> | 149 | * <appro@fy.chalmers.se> |
151 | */ | 150 | */ |
152 | # if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) | 151 | # if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) |
153 | # define ROTATE(a,n) ({ register unsigned int ret; \ | 152 | # define ROTATE(a,n) ({ register unsigned int ret; \ |
154 | asm ( \ | 153 | asm ( \ |
155 | "roll %1,%0" \ | 154 | "roll %1,%0" \ |
156 | : "=r"(ret) \ | 155 | : "=r"(ret) \ |
@@ -158,25 +157,24 @@ | |||
158 | : "cc"); \ | 157 | : "cc"); \ |
159 | ret; \ | 158 | ret; \ |
160 | }) | 159 | }) |
161 | # elif defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \ | 160 | # elif defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \ |
162 | defined(__powerpc) || defined(__ppc__) || defined(__powerpc64__) | 161 | defined(__powerpc) || defined(__ppc__) || defined(__powerpc64__) |
163 | # define ROTATE(a,n) ({ register unsigned int ret; \ | 162 | # define ROTATE(a,n) ({ register unsigned int ret; \ |
164 | asm ( \ | 163 | asm ( \ |
165 | "rlwinm %0,%1,%2,0,31" \ | 164 | "rlwinm %0,%1,%2,0,31" \ |
166 | : "=r"(ret) \ | 165 | : "=r"(ret) \ |
167 | : "r"(a), "I"(n)); \ | 166 | : "r"(a), "I"(n)); \ |
168 | ret; \ | 167 | ret; \ |
169 | }) | 168 | }) |
170 | # elif defined(__s390x__) | 169 | # elif defined(__s390x__) |
171 | # define ROTATE(a,n) ({ register unsigned int ret; \ | 170 | # define ROTATE(a,n) ({ register unsigned int ret; \ |
172 | asm ("rll %0,%1,%2" \ | 171 | asm ("rll %0,%1,%2" \ |
173 | : "=r"(ret) \ | 172 | : "=r"(ret) \ |
174 | : "r"(a), "I"(n)); \ | 173 | : "r"(a), "I"(n)); \ |
175 | ret; \ | 174 | ret; \ |
176 | }) | 175 | }) |
177 | # endif | ||
178 | # endif | 176 | # endif |
179 | #endif /* PEDANTIC */ | 177 | #endif |
180 | 178 | ||
181 | #ifndef ROTATE | 179 | #ifndef ROTATE |
182 | #define ROTATE(a,n) (((a)<<(n))|(((a)&0xffffffff)>>(32-(n)))) | 180 | #define ROTATE(a,n) (((a)<<(n))|(((a)&0xffffffff)>>(32-(n)))) |
@@ -184,9 +182,8 @@ | |||
184 | 182 | ||
185 | #if defined(DATA_ORDER_IS_BIG_ENDIAN) | 183 | #if defined(DATA_ORDER_IS_BIG_ENDIAN) |
186 | 184 | ||
187 | #ifndef PEDANTIC | 185 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
188 | # if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) | 186 | # if ((defined(__i386) || defined(__i386__)) && !defined(I386_ONLY)) || \ |
189 | # if ((defined(__i386) || defined(__i386__)) && !defined(I386_ONLY)) || \ | ||
190 | (defined(__x86_64) || defined(__x86_64__)) | 187 | (defined(__x86_64) || defined(__x86_64__)) |
191 | /* | 188 | /* |
192 | * This gives ~30-40% performance improvement in SHA-256 compiled | 189 | * This gives ~30-40% performance improvement in SHA-256 compiled |
@@ -194,13 +191,12 @@ | |||
194 | * this trick on x86* platforms only, because these CPUs can fetch | 191 | * this trick on x86* platforms only, because these CPUs can fetch |
195 | * unaligned data without raising an exception. | 192 | * unaligned data without raising an exception. |
196 | */ | 193 | */ |
197 | # define HOST_c2l(c,l) ({ unsigned int r=*((const unsigned int *)(c)); \ | 194 | # define HOST_c2l(c,l) ({ unsigned int r=*((const unsigned int *)(c)); \ |
198 | asm ("bswapl %0":"=r"(r):"0"(r)); \ | 195 | asm ("bswapl %0":"=r"(r):"0"(r)); \ |
199 | (c)+=4; (l)=r; }) | 196 | (c)+=4; (l)=r; }) |
200 | # define HOST_l2c(l,c) ({ unsigned int r=(l); \ | 197 | # define HOST_l2c(l,c) ({ unsigned int r=(l); \ |
201 | asm ("bswapl %0":"=r"(r):"0"(r)); \ | 198 | asm ("bswapl %0":"=r"(r):"0"(r)); \ |
202 | *((unsigned int *)(c))=r; (c)+=4; r; }) | 199 | *((unsigned int *)(c))=r; (c)+=4; r; }) |
203 | # endif | ||
204 | # endif | 200 | # endif |
205 | #endif | 201 | #endif |
206 | #if defined(__s390__) || defined(__s390x__) | 202 | #if defined(__s390__) || defined(__s390x__) |
@@ -225,16 +221,14 @@ | |||
225 | 221 | ||
226 | #elif defined(DATA_ORDER_IS_LITTLE_ENDIAN) | 222 | #elif defined(DATA_ORDER_IS_LITTLE_ENDIAN) |
227 | 223 | ||
228 | #ifndef PEDANTIC | 224 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
229 | # if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) | 225 | # if defined(__s390x__) |
230 | # if defined(__s390x__) | 226 | # define HOST_c2l(c,l) ({ asm ("lrv %0,%1" \ |
231 | # define HOST_c2l(c,l) ({ asm ("lrv %0,%1" \ | ||
232 | :"=d"(l) :"m"(*(const unsigned int *)(c)));\ | 227 | :"=d"(l) :"m"(*(const unsigned int *)(c)));\ |
233 | (c)+=4; (l); }) | 228 | (c)+=4; (l); }) |
234 | # define HOST_l2c(l,c) ({ asm ("strv %1,%0" \ | 229 | # define HOST_l2c(l,c) ({ asm ("strv %1,%0" \ |
235 | :"=m"(*(unsigned int *)(c)) :"d"(l));\ | 230 | :"=m"(*(unsigned int *)(c)) :"d"(l));\ |
236 | (c)+=4; (l); }) | 231 | (c)+=4; (l); }) |
237 | # endif | ||
238 | # endif | 232 | # endif |
239 | #endif | 233 | #endif |
240 | #if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) | 234 | #if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) |
diff --git a/src/lib/libcrypto/modes/modes_lcl.h b/src/lib/libcrypto/modes/modes_lcl.h index 9057f7fd76..2fc8138273 100644 --- a/src/lib/libcrypto/modes/modes_lcl.h +++ b/src/lib/libcrypto/modes/modes_lcl.h | |||
@@ -34,7 +34,7 @@ typedef unsigned char u8; | |||
34 | # undef STRICT_ALIGNMENT | 34 | # undef STRICT_ALIGNMENT |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | #if !defined(PEDANTIC) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) | 37 | #if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
38 | #if defined(__GNUC__) && __GNUC__>=2 | 38 | #if defined(__GNUC__) && __GNUC__>=2 |
39 | # if defined(__x86_64) || defined(__x86_64__) | 39 | # if defined(__x86_64) || defined(__x86_64__) |
40 | # define BSWAP8(x) ({ u64 ret=(x); \ | 40 | # define BSWAP8(x) ({ u64 ret=(x); \ |
diff --git a/src/lib/libcrypto/pem/pem_seal.c b/src/lib/libcrypto/pem/pem_seal.c index 3c0be6d305..92b70157cd 100644 --- a/src/lib/libcrypto/pem/pem_seal.c +++ b/src/lib/libcrypto/pem/pem_seal.c | |||
@@ -186,10 +186,4 @@ err: | |||
186 | free(s); | 186 | free(s); |
187 | return (ret); | 187 | return (ret); |
188 | } | 188 | } |
189 | #else /* !OPENSSL_NO_RSA */ | ||
190 | |||
191 | # if PEDANTIC | ||
192 | static void *dummy = &dummy; | ||
193 | # endif | ||
194 | |||
195 | #endif | 189 | #endif |
diff --git a/src/lib/libcrypto/rc5/rc5_locl.h b/src/lib/libcrypto/rc5/rc5_locl.h index 314ce8909a..14086c8551 100644 --- a/src/lib/libcrypto/rc5/rc5_locl.h +++ b/src/lib/libcrypto/rc5/rc5_locl.h | |||
@@ -146,7 +146,7 @@ | |||
146 | *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ | 146 | *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ |
147 | *((c)++)=(unsigned char)(((l) )&0xff)) | 147 | *((c)++)=(unsigned char)(((l) )&0xff)) |
148 | 148 | ||
149 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(__STRICT_ANSI__) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) && !defined(PEDANTIC) | 149 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(__STRICT_ANSI__) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
150 | # if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) | 150 | # if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) |
151 | # define ROTATE_l32(a,n) ({ register unsigned int ret; \ | 151 | # define ROTATE_l32(a,n) ({ register unsigned int ret; \ |
152 | asm ("roll %%cl,%0" \ | 152 | asm ("roll %%cl,%0" \ |
diff --git a/src/lib/libcrypto/sha/sha512.c b/src/lib/libcrypto/sha/sha512.c index 49afaa05c2..ca7991a9ca 100644 --- a/src/lib/libcrypto/sha/sha512.c +++ b/src/lib/libcrypto/sha/sha512.c | |||
@@ -311,21 +311,20 @@ static const SHA_LONG64 K512[80] = { | |||
311 | U64(0x4cc5d4becb3e42b6),U64(0x597f299cfc657e2a), | 311 | U64(0x4cc5d4becb3e42b6),U64(0x597f299cfc657e2a), |
312 | U64(0x5fcb6fab3ad6faec),U64(0x6c44198c4a475817) }; | 312 | U64(0x5fcb6fab3ad6faec),U64(0x6c44198c4a475817) }; |
313 | 313 | ||
314 | #ifndef PEDANTIC | 314 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
315 | # if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) | 315 | # if defined(__x86_64) || defined(__x86_64__) |
316 | # if defined(__x86_64) || defined(__x86_64__) | 316 | # define ROTR(a,n) ({ SHA_LONG64 ret; \ |
317 | # define ROTR(a,n) ({ SHA_LONG64 ret; \ | ||
318 | asm ("rorq %1,%0" \ | 317 | asm ("rorq %1,%0" \ |
319 | : "=r"(ret) \ | 318 | : "=r"(ret) \ |
320 | : "J"(n),"0"(a) \ | 319 | : "J"(n),"0"(a) \ |
321 | : "cc"); ret; }) | 320 | : "cc"); ret; }) |
322 | # define PULL64(x) ({ SHA_LONG64 ret=*((const SHA_LONG64 *)(&(x))); \ | 321 | # define PULL64(x) ({ SHA_LONG64 ret=*((const SHA_LONG64 *)(&(x))); \ |
323 | asm ("bswapq %0" \ | 322 | asm ("bswapq %0" \ |
324 | : "=r"(ret) \ | 323 | : "=r"(ret) \ |
325 | : "0"(ret)); ret; }) | 324 | : "0"(ret)); ret; }) |
326 | # elif (defined(__i386) || defined(__i386__)) | 325 | # elif (defined(__i386) || defined(__i386__)) |
327 | # if defined(I386_ONLY) | 326 | # if defined(I386_ONLY) |
328 | # define PULL64(x) ({ const unsigned int *p=(const unsigned int *)(&(x));\ | 327 | # define PULL64(x) ({ const unsigned int *p=(const unsigned int *)(&(x));\ |
329 | unsigned int hi=p[0],lo=p[1]; \ | 328 | unsigned int hi=p[0],lo=p[1]; \ |
330 | asm("xchgb %%ah,%%al;xchgb %%dh,%%dl;"\ | 329 | asm("xchgb %%ah,%%al;xchgb %%dh,%%dl;"\ |
331 | "roll $16,%%eax; roll $16,%%edx; "\ | 330 | "roll $16,%%eax; roll $16,%%edx; "\ |
@@ -333,20 +332,19 @@ static const SHA_LONG64 K512[80] = { | |||
333 | : "=a"(lo),"=d"(hi) \ | 332 | : "=a"(lo),"=d"(hi) \ |
334 | : "0"(lo),"1"(hi) : "cc"); \ | 333 | : "0"(lo),"1"(hi) : "cc"); \ |
335 | ((SHA_LONG64)hi)<<32|lo; }) | 334 | ((SHA_LONG64)hi)<<32|lo; }) |
336 | # else | 335 | # else |
337 | # define PULL64(x) ({ const unsigned int *p=(const unsigned int *)(&(x));\ | 336 | # define PULL64(x) ({ const unsigned int *p=(const unsigned int *)(&(x));\ |
338 | unsigned int hi=p[0],lo=p[1]; \ | 337 | unsigned int hi=p[0],lo=p[1]; \ |
339 | asm ("bswapl %0; bswapl %1;" \ | 338 | asm ("bswapl %0; bswapl %1;" \ |
340 | : "=r"(lo),"=r"(hi) \ | 339 | : "=r"(lo),"=r"(hi) \ |
341 | : "0"(lo),"1"(hi)); \ | 340 | : "0"(lo),"1"(hi)); \ |
342 | ((SHA_LONG64)hi)<<32|lo; }) | 341 | ((SHA_LONG64)hi)<<32|lo; }) |
343 | # endif | 342 | # endif |
344 | # elif (defined(_ARCH_PPC) && defined(__64BIT__)) || defined(_ARCH_PPC64) | 343 | # elif (defined(_ARCH_PPC) && defined(__64BIT__)) || defined(_ARCH_PPC64) |
345 | # define ROTR(a,n) ({ SHA_LONG64 ret; \ | 344 | # define ROTR(a,n) ({ SHA_LONG64 ret; \ |
346 | asm ("rotrdi %0,%1,%2" \ | 345 | asm ("rotrdi %0,%1,%2" \ |
347 | : "=r"(ret) \ | 346 | : "=r"(ret) \ |
348 | : "r"(a),"K"(n)); ret; }) | 347 | : "r"(a),"K"(n)); ret; }) |
349 | # endif | ||
350 | # endif | 348 | # endif |
351 | #endif | 349 | #endif |
352 | 350 | ||
@@ -560,10 +558,4 @@ static void sha512_block_data_order (SHA512_CTX *ctx, const void *in, size_t num | |||
560 | 558 | ||
561 | #endif /* SHA512_ASM */ | 559 | #endif /* SHA512_ASM */ |
562 | 560 | ||
563 | #else /* !OPENSSL_NO_SHA512 */ | ||
564 | |||
565 | #if defined(PEDANTIC) || defined(__DECC) || defined(OPENSSL_SYS_MACOSX) | ||
566 | static void *dummy=&dummy; | ||
567 | #endif | ||
568 | |||
569 | #endif /* !OPENSSL_NO_SHA512 */ | 561 | #endif /* !OPENSSL_NO_SHA512 */ |
diff --git a/src/lib/libssl/src/apps/dh.c b/src/lib/libssl/src/apps/dh.c index af326a7340..c841e6826b 100644 --- a/src/lib/libssl/src/apps/dh.c +++ b/src/lib/libssl/src/apps/dh.c | |||
@@ -313,10 +313,4 @@ end: | |||
313 | apps_shutdown(); | 313 | apps_shutdown(); |
314 | return (ret); | 314 | return (ret); |
315 | } | 315 | } |
316 | #else /* !OPENSSL_NO_DH */ | ||
317 | |||
318 | #if PEDANTIC | ||
319 | static void *dummy = &dummy; | ||
320 | #endif | ||
321 | |||
322 | #endif | 316 | #endif |
diff --git a/src/lib/libssl/src/apps/dhparam.c b/src/lib/libssl/src/apps/dhparam.c index 8ca71f5e5d..249d9a7751 100644 --- a/src/lib/libssl/src/apps/dhparam.c +++ b/src/lib/libssl/src/apps/dhparam.c | |||
@@ -501,10 +501,4 @@ dh_cb(int p, int n, BN_GENCB * cb) | |||
501 | return 1; | 501 | return 1; |
502 | } | 502 | } |
503 | 503 | ||
504 | #else /* !OPENSSL_NO_DH */ | ||
505 | |||
506 | #if PEDANTIC | ||
507 | static void *dummy = &dummy; | ||
508 | #endif | ||
509 | |||
510 | #endif | 504 | #endif |
diff --git a/src/lib/libssl/src/apps/dsa.c b/src/lib/libssl/src/apps/dsa.c index 6df8c25596..9546790c0d 100644 --- a/src/lib/libssl/src/apps/dsa.c +++ b/src/lib/libssl/src/apps/dsa.c | |||
@@ -343,10 +343,4 @@ end: | |||
343 | apps_shutdown(); | 343 | apps_shutdown(); |
344 | return (ret); | 344 | return (ret); |
345 | } | 345 | } |
346 | #else /* !OPENSSL_NO_DSA */ | ||
347 | |||
348 | #if PEDANTIC | ||
349 | static void *dummy = &dummy; | ||
350 | #endif | ||
351 | |||
352 | #endif | 346 | #endif |
diff --git a/src/lib/libssl/src/apps/dsaparam.c b/src/lib/libssl/src/apps/dsaparam.c index af34b24f8b..ae501b2d04 100644 --- a/src/lib/libssl/src/apps/dsaparam.c +++ b/src/lib/libssl/src/apps/dsaparam.c | |||
@@ -425,10 +425,4 @@ dsa_cb(int p, int n, BN_GENCB * cb) | |||
425 | #endif | 425 | #endif |
426 | return 1; | 426 | return 1; |
427 | } | 427 | } |
428 | #else /* !OPENSSL_NO_DSA */ | ||
429 | |||
430 | #if PEDANTIC | ||
431 | static void *dummy = &dummy; | ||
432 | #endif | ||
433 | |||
434 | #endif | 428 | #endif |
diff --git a/src/lib/libssl/src/apps/ec.c b/src/lib/libssl/src/apps/ec.c index 561b6847aa..55a65d5786 100644 --- a/src/lib/libssl/src/apps/ec.c +++ b/src/lib/libssl/src/apps/ec.c | |||
@@ -347,10 +347,4 @@ end: | |||
347 | apps_shutdown(); | 347 | apps_shutdown(); |
348 | return (ret); | 348 | return (ret); |
349 | } | 349 | } |
350 | #else /* !OPENSSL_NO_EC */ | ||
351 | |||
352 | #if PEDANTIC | ||
353 | static void *dummy = &dummy; | ||
354 | #endif | ||
355 | |||
356 | #endif | 350 | #endif |
diff --git a/src/lib/libssl/src/apps/ecparam.c b/src/lib/libssl/src/apps/ecparam.c index 79ced18fa4..7a071667c4 100644 --- a/src/lib/libssl/src/apps/ecparam.c +++ b/src/lib/libssl/src/apps/ecparam.c | |||
@@ -624,10 +624,4 @@ ecparam_print_var(BIO * out, BIGNUM * in, const char *var, | |||
624 | BIO_printf(out, "\n\t};\n\n"); | 624 | BIO_printf(out, "\n\t};\n\n"); |
625 | return 1; | 625 | return 1; |
626 | } | 626 | } |
627 | #else /* !OPENSSL_NO_EC */ | ||
628 | |||
629 | #if PEDANTIC | ||
630 | static void *dummy = &dummy; | ||
631 | #endif | ||
632 | |||
633 | #endif | 627 | #endif |
diff --git a/src/lib/libssl/src/apps/engine.c b/src/lib/libssl/src/apps/engine.c index 648d465cff..3bf81ab017 100644 --- a/src/lib/libssl/src/apps/engine.c +++ b/src/lib/libssl/src/apps/engine.c | |||
@@ -502,10 +502,4 @@ end: | |||
502 | apps_shutdown(); | 502 | apps_shutdown(); |
503 | return (ret); | 503 | return (ret); |
504 | } | 504 | } |
505 | #else | ||
506 | |||
507 | #if PEDANTIC | ||
508 | static void *dummy = &dummy; | ||
509 | #endif | ||
510 | |||
511 | #endif | 505 | #endif |
diff --git a/src/lib/libssl/src/apps/gendh.c b/src/lib/libssl/src/apps/gendh.c index c09e5923a5..94c4827279 100644 --- a/src/lib/libssl/src/apps/gendh.c +++ b/src/lib/libssl/src/apps/gendh.c | |||
@@ -216,10 +216,4 @@ dh_cb(int p, int n, BN_GENCB * cb) | |||
216 | #endif | 216 | #endif |
217 | return 1; | 217 | return 1; |
218 | } | 218 | } |
219 | #else /* !OPENSSL_NO_DH */ | ||
220 | |||
221 | #if PEDANTIC | ||
222 | static void *dummy = &dummy; | ||
223 | #endif | ||
224 | |||
225 | #endif | 219 | #endif |
diff --git a/src/lib/libssl/src/apps/gendsa.c b/src/lib/libssl/src/apps/gendsa.c index bcc11a2e62..f21036a608 100644 --- a/src/lib/libssl/src/apps/gendsa.c +++ b/src/lib/libssl/src/apps/gendsa.c | |||
@@ -250,10 +250,4 @@ end: | |||
250 | apps_shutdown(); | 250 | apps_shutdown(); |
251 | return (ret); | 251 | return (ret); |
252 | } | 252 | } |
253 | #else /* !OPENSSL_NO_DSA */ | ||
254 | |||
255 | #if PEDANTIC | ||
256 | static void *dummy = &dummy; | ||
257 | #endif | ||
258 | |||
259 | #endif | 253 | #endif |
diff --git a/src/lib/libssl/src/apps/genrsa.c b/src/lib/libssl/src/apps/genrsa.c index 5b5fbc6fa9..020bc49aaf 100644 --- a/src/lib/libssl/src/apps/genrsa.c +++ b/src/lib/libssl/src/apps/genrsa.c | |||
@@ -308,10 +308,4 @@ genrsa_cb(int p, int n, BN_GENCB * cb) | |||
308 | #endif | 308 | #endif |
309 | return 1; | 309 | return 1; |
310 | } | 310 | } |
311 | #else /* !OPENSSL_NO_RSA */ | ||
312 | |||
313 | #if PEDANTIC | ||
314 | static void *dummy = &dummy; | ||
315 | #endif | ||
316 | |||
317 | #endif | 311 | #endif |
diff --git a/src/lib/libssl/src/apps/passwd.c b/src/lib/libssl/src/apps/passwd.c index 09c427065a..a08edb240a 100644 --- a/src/lib/libssl/src/apps/passwd.c +++ b/src/lib/libssl/src/apps/passwd.c | |||
@@ -349,10 +349,7 @@ md5crypt(const char *passwd, const char *magic, const char *salt) | |||
349 | buf_perm[dest] = buf[source]; | 349 | buf_perm[dest] = buf[source]; |
350 | buf_perm[14] = buf[5]; | 350 | buf_perm[14] = buf[5]; |
351 | buf_perm[15] = buf[11]; | 351 | buf_perm[15] = buf[11]; |
352 | #ifndef PEDANTIC /* Unfortunately, this generates a "no | ||
353 | * effect" warning */ | ||
354 | assert(16 == sizeof buf_perm); | 352 | assert(16 == sizeof buf_perm); |
355 | #endif | ||
356 | 353 | ||
357 | output = salt_out + salt_len; | 354 | output = salt_out + salt_len; |
358 | assert(output == out_buf + strlen(out_buf)); | 355 | assert(output == out_buf + strlen(out_buf)); |
diff --git a/src/lib/libssl/src/apps/rsa.c b/src/lib/libssl/src/apps/rsa.c index 0e08d929ba..eef0a92153 100644 --- a/src/lib/libssl/src/apps/rsa.c +++ b/src/lib/libssl/src/apps/rsa.c | |||
@@ -402,10 +402,4 @@ end: | |||
402 | apps_shutdown(); | 402 | apps_shutdown(); |
403 | return (ret); | 403 | return (ret); |
404 | } | 404 | } |
405 | #else /* !OPENSSL_NO_RSA */ | ||
406 | |||
407 | #if PEDANTIC | ||
408 | static void *dummy = &dummy; | ||
409 | #endif | ||
410 | |||
411 | #endif | 405 | #endif |
diff --git a/src/lib/libssl/src/apps/rsautl.c b/src/lib/libssl/src/apps/rsautl.c index dab8d6f6e3..9c5b96fa2a 100644 --- a/src/lib/libssl/src/apps/rsautl.c +++ b/src/lib/libssl/src/apps/rsautl.c | |||
@@ -345,10 +345,4 @@ usage() | |||
345 | 345 | ||
346 | } | 346 | } |
347 | 347 | ||
348 | #else /* !OPENSSL_NO_RSA */ | ||
349 | |||
350 | #if PEDANTIC | ||
351 | static void *dummy = &dummy; | ||
352 | #endif | ||
353 | |||
354 | #endif | 348 | #endif |
diff --git a/src/lib/libssl/src/crypto/asn1/n_pkey.c b/src/lib/libssl/src/crypto/asn1/n_pkey.c index 5c6181b04c..078caf8a15 100644 --- a/src/lib/libssl/src/crypto/asn1/n_pkey.c +++ b/src/lib/libssl/src/crypto/asn1/n_pkey.c | |||
@@ -335,10 +335,4 @@ err: | |||
335 | 335 | ||
336 | #endif /* OPENSSL_NO_RC4 */ | 336 | #endif /* OPENSSL_NO_RC4 */ |
337 | 337 | ||
338 | #else /* !OPENSSL_NO_RSA */ | ||
339 | |||
340 | # if PEDANTIC | ||
341 | static void *dummy = &dummy; | ||
342 | # endif | ||
343 | |||
344 | #endif | 338 | #endif |
diff --git a/src/lib/libssl/src/crypto/bn/bn_div.c b/src/lib/libssl/src/crypto/bn/bn_div.c index 7817c345f0..871f29e34f 100644 --- a/src/lib/libssl/src/crypto/bn/bn_div.c +++ b/src/lib/libssl/src/crypto/bn/bn_div.c | |||
@@ -128,7 +128,7 @@ int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d, | |||
128 | #else | 128 | #else |
129 | 129 | ||
130 | #if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) \ | 130 | #if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) \ |
131 | && !defined(PEDANTIC) && !defined(BN_DIV3W) | 131 | && !defined(BN_DIV3W) |
132 | # if defined(__GNUC__) && __GNUC__>=2 | 132 | # if defined(__GNUC__) && __GNUC__>=2 |
133 | # if defined(__i386) || defined (__i386__) | 133 | # if defined(__i386) || defined (__i386__) |
134 | /* | 134 | /* |
diff --git a/src/lib/libssl/src/crypto/bn/bn_lcl.h b/src/lib/libssl/src/crypto/bn/bn_lcl.h index 1208deb3cf..22b4d17eb6 100644 --- a/src/lib/libssl/src/crypto/bn/bn_lcl.h +++ b/src/lib/libssl/src/crypto/bn/bn_lcl.h | |||
@@ -210,7 +210,7 @@ extern "C" { | |||
210 | #define BN_MUL_LOW_RECURSIVE_SIZE_NORMAL (32) /* 32 */ | 210 | #define BN_MUL_LOW_RECURSIVE_SIZE_NORMAL (32) /* 32 */ |
211 | #define BN_MONT_CTX_SET_SIZE_WORD (64) /* 32 */ | 211 | #define BN_MONT_CTX_SET_SIZE_WORD (64) /* 32 */ |
212 | 212 | ||
213 | #if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) && !defined(PEDANTIC) | 213 | #if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
214 | /* | 214 | /* |
215 | * BN_UMULT_HIGH section. | 215 | * BN_UMULT_HIGH section. |
216 | * | 216 | * |
diff --git a/src/lib/libssl/src/crypto/camellia/camellia.c b/src/lib/libssl/src/crypto/camellia/camellia.c index 44c4202c2b..2c02466564 100644 --- a/src/lib/libssl/src/crypto/camellia/camellia.c +++ b/src/lib/libssl/src/crypto/camellia/camellia.c | |||
@@ -87,7 +87,7 @@ | |||
87 | #include <stdlib.h> | 87 | #include <stdlib.h> |
88 | 88 | ||
89 | /* 32-bit rotations */ | 89 | /* 32-bit rotations */ |
90 | #if !defined(PEDANTIC) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) | 90 | #if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
91 | # if defined(__GNUC__) && __GNUC__>=2 | 91 | # if defined(__GNUC__) && __GNUC__>=2 |
92 | # if defined(__i386) || defined(__x86_64) | 92 | # if defined(__i386) || defined(__x86_64) |
93 | # define RightRotate(x,s) ({u32 ret; asm ("rorl %1,%0":"=r"(ret):"I"(s),"0"(x):"cc"); ret; }) | 93 | # define RightRotate(x,s) ({u32 ret; asm ("rorl %1,%0":"=r"(ret):"I"(s),"0"(x):"cc"); ret; }) |
diff --git a/src/lib/libssl/src/crypto/des/des_locl.h b/src/lib/libssl/src/crypto/des/des_locl.h index bbae457377..00fcd2a8ac 100644 --- a/src/lib/libssl/src/crypto/des/des_locl.h +++ b/src/lib/libssl/src/crypto/des/des_locl.h | |||
@@ -152,7 +152,7 @@ | |||
152 | } \ | 152 | } \ |
153 | } | 153 | } |
154 | 154 | ||
155 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(__STRICT_ANSI__) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) && !defined(PEDANTIC) | 155 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(__STRICT_ANSI__) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
156 | # if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) | 156 | # if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) |
157 | # define ROTATE(a,n) ({ register unsigned int ret; \ | 157 | # define ROTATE(a,n) ({ register unsigned int ret; \ |
158 | asm ("rorl %1,%0" \ | 158 | asm ("rorl %1,%0" \ |
diff --git a/src/lib/libssl/src/crypto/evp/e_aes_cbc_hmac_sha1.c b/src/lib/libssl/src/crypto/evp/e_aes_cbc_hmac_sha1.c index fb2c884a78..4d76ec74d2 100644 --- a/src/lib/libssl/src/crypto/evp/e_aes_cbc_hmac_sha1.c +++ b/src/lib/libssl/src/crypto/evp/e_aes_cbc_hmac_sha1.c | |||
@@ -90,7 +90,7 @@ typedef struct | |||
90 | defined(_M_AMD64) || defined(_M_X64) || \ | 90 | defined(_M_AMD64) || defined(_M_X64) || \ |
91 | defined(__INTEL__) ) | 91 | defined(__INTEL__) ) |
92 | 92 | ||
93 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(PEDANTIC) | 93 | #if defined(__GNUC__) && __GNUC__>=2 |
94 | # define BSWAP(x) ({ unsigned int r=(x); asm ("bswapl %0":"=r"(r):"0"(r)); r; }) | 94 | # define BSWAP(x) ({ unsigned int r=(x); asm ("bswapl %0":"=r"(r):"0"(r)); r; }) |
95 | #endif | 95 | #endif |
96 | 96 | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_camellia.c b/src/lib/libssl/src/crypto/evp/e_camellia.c index a7b40d1c60..8bb7c320d3 100644 --- a/src/lib/libssl/src/crypto/evp/e_camellia.c +++ b/src/lib/libssl/src/crypto/evp/e_camellia.c | |||
@@ -122,10 +122,4 @@ static int camellia_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | |||
122 | return 1; | 122 | return 1; |
123 | } | 123 | } |
124 | 124 | ||
125 | #else | ||
126 | |||
127 | # ifdef PEDANTIC | ||
128 | static void *dummy=&dummy; | ||
129 | # endif | ||
130 | |||
131 | #endif | 125 | #endif |
diff --git a/src/lib/libssl/src/crypto/evp/p_open.c b/src/lib/libssl/src/crypto/evp/p_open.c index 2a5ab2b6cc..b832ec6a6b 100644 --- a/src/lib/libssl/src/crypto/evp/p_open.c +++ b/src/lib/libssl/src/crypto/evp/p_open.c | |||
@@ -119,10 +119,4 @@ int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | |||
119 | i = EVP_DecryptInit_ex(ctx,NULL,NULL,NULL,NULL); | 119 | i = EVP_DecryptInit_ex(ctx,NULL,NULL,NULL,NULL); |
120 | return(i); | 120 | return(i); |
121 | } | 121 | } |
122 | #else /* !OPENSSL_NO_RSA */ | ||
123 | |||
124 | # ifdef PEDANTIC | ||
125 | static void *dummy=&dummy; | ||
126 | # endif | ||
127 | |||
128 | #endif | 122 | #endif |
diff --git a/src/lib/libssl/src/crypto/md32_common.h b/src/lib/libssl/src/crypto/md32_common.h index be097bfc70..7e25b2ad3b 100644 --- a/src/lib/libssl/src/crypto/md32_common.h +++ b/src/lib/libssl/src/crypto/md32_common.h | |||
@@ -141,16 +141,15 @@ | |||
141 | * Engage compiler specific rotate intrinsic function if available. | 141 | * Engage compiler specific rotate intrinsic function if available. |
142 | */ | 142 | */ |
143 | #undef ROTATE | 143 | #undef ROTATE |
144 | #ifndef PEDANTIC | 144 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
145 | # if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) | ||
146 | /* | 145 | /* |
147 | * Some GNU C inline assembler templates. Note that these are | 146 | * Some GNU C inline assembler templates. Note that these are |
148 | * rotates by *constant* number of bits! But that's exactly | 147 | * rotates by *constant* number of bits! But that's exactly |
149 | * what we need here... | 148 | * what we need here... |
150 | * <appro@fy.chalmers.se> | 149 | * <appro@fy.chalmers.se> |
151 | */ | 150 | */ |
152 | # if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) | 151 | # if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) |
153 | # define ROTATE(a,n) ({ register unsigned int ret; \ | 152 | # define ROTATE(a,n) ({ register unsigned int ret; \ |
154 | asm ( \ | 153 | asm ( \ |
155 | "roll %1,%0" \ | 154 | "roll %1,%0" \ |
156 | : "=r"(ret) \ | 155 | : "=r"(ret) \ |
@@ -158,25 +157,24 @@ | |||
158 | : "cc"); \ | 157 | : "cc"); \ |
159 | ret; \ | 158 | ret; \ |
160 | }) | 159 | }) |
161 | # elif defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \ | 160 | # elif defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \ |
162 | defined(__powerpc) || defined(__ppc__) || defined(__powerpc64__) | 161 | defined(__powerpc) || defined(__ppc__) || defined(__powerpc64__) |
163 | # define ROTATE(a,n) ({ register unsigned int ret; \ | 162 | # define ROTATE(a,n) ({ register unsigned int ret; \ |
164 | asm ( \ | 163 | asm ( \ |
165 | "rlwinm %0,%1,%2,0,31" \ | 164 | "rlwinm %0,%1,%2,0,31" \ |
166 | : "=r"(ret) \ | 165 | : "=r"(ret) \ |
167 | : "r"(a), "I"(n)); \ | 166 | : "r"(a), "I"(n)); \ |
168 | ret; \ | 167 | ret; \ |
169 | }) | 168 | }) |
170 | # elif defined(__s390x__) | 169 | # elif defined(__s390x__) |
171 | # define ROTATE(a,n) ({ register unsigned int ret; \ | 170 | # define ROTATE(a,n) ({ register unsigned int ret; \ |
172 | asm ("rll %0,%1,%2" \ | 171 | asm ("rll %0,%1,%2" \ |
173 | : "=r"(ret) \ | 172 | : "=r"(ret) \ |
174 | : "r"(a), "I"(n)); \ | 173 | : "r"(a), "I"(n)); \ |
175 | ret; \ | 174 | ret; \ |
176 | }) | 175 | }) |
177 | # endif | ||
178 | # endif | 176 | # endif |
179 | #endif /* PEDANTIC */ | 177 | #endif |
180 | 178 | ||
181 | #ifndef ROTATE | 179 | #ifndef ROTATE |
182 | #define ROTATE(a,n) (((a)<<(n))|(((a)&0xffffffff)>>(32-(n)))) | 180 | #define ROTATE(a,n) (((a)<<(n))|(((a)&0xffffffff)>>(32-(n)))) |
@@ -184,9 +182,8 @@ | |||
184 | 182 | ||
185 | #if defined(DATA_ORDER_IS_BIG_ENDIAN) | 183 | #if defined(DATA_ORDER_IS_BIG_ENDIAN) |
186 | 184 | ||
187 | #ifndef PEDANTIC | 185 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
188 | # if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) | 186 | # if ((defined(__i386) || defined(__i386__)) && !defined(I386_ONLY)) || \ |
189 | # if ((defined(__i386) || defined(__i386__)) && !defined(I386_ONLY)) || \ | ||
190 | (defined(__x86_64) || defined(__x86_64__)) | 187 | (defined(__x86_64) || defined(__x86_64__)) |
191 | /* | 188 | /* |
192 | * This gives ~30-40% performance improvement in SHA-256 compiled | 189 | * This gives ~30-40% performance improvement in SHA-256 compiled |
@@ -194,13 +191,12 @@ | |||
194 | * this trick on x86* platforms only, because these CPUs can fetch | 191 | * this trick on x86* platforms only, because these CPUs can fetch |
195 | * unaligned data without raising an exception. | 192 | * unaligned data without raising an exception. |
196 | */ | 193 | */ |
197 | # define HOST_c2l(c,l) ({ unsigned int r=*((const unsigned int *)(c)); \ | 194 | # define HOST_c2l(c,l) ({ unsigned int r=*((const unsigned int *)(c)); \ |
198 | asm ("bswapl %0":"=r"(r):"0"(r)); \ | 195 | asm ("bswapl %0":"=r"(r):"0"(r)); \ |
199 | (c)+=4; (l)=r; }) | 196 | (c)+=4; (l)=r; }) |
200 | # define HOST_l2c(l,c) ({ unsigned int r=(l); \ | 197 | # define HOST_l2c(l,c) ({ unsigned int r=(l); \ |
201 | asm ("bswapl %0":"=r"(r):"0"(r)); \ | 198 | asm ("bswapl %0":"=r"(r):"0"(r)); \ |
202 | *((unsigned int *)(c))=r; (c)+=4; r; }) | 199 | *((unsigned int *)(c))=r; (c)+=4; r; }) |
203 | # endif | ||
204 | # endif | 200 | # endif |
205 | #endif | 201 | #endif |
206 | #if defined(__s390__) || defined(__s390x__) | 202 | #if defined(__s390__) || defined(__s390x__) |
@@ -225,16 +221,14 @@ | |||
225 | 221 | ||
226 | #elif defined(DATA_ORDER_IS_LITTLE_ENDIAN) | 222 | #elif defined(DATA_ORDER_IS_LITTLE_ENDIAN) |
227 | 223 | ||
228 | #ifndef PEDANTIC | 224 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
229 | # if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) | 225 | # if defined(__s390x__) |
230 | # if defined(__s390x__) | 226 | # define HOST_c2l(c,l) ({ asm ("lrv %0,%1" \ |
231 | # define HOST_c2l(c,l) ({ asm ("lrv %0,%1" \ | ||
232 | :"=d"(l) :"m"(*(const unsigned int *)(c)));\ | 227 | :"=d"(l) :"m"(*(const unsigned int *)(c)));\ |
233 | (c)+=4; (l); }) | 228 | (c)+=4; (l); }) |
234 | # define HOST_l2c(l,c) ({ asm ("strv %1,%0" \ | 229 | # define HOST_l2c(l,c) ({ asm ("strv %1,%0" \ |
235 | :"=m"(*(unsigned int *)(c)) :"d"(l));\ | 230 | :"=m"(*(unsigned int *)(c)) :"d"(l));\ |
236 | (c)+=4; (l); }) | 231 | (c)+=4; (l); }) |
237 | # endif | ||
238 | # endif | 232 | # endif |
239 | #endif | 233 | #endif |
240 | #if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) | 234 | #if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) |
diff --git a/src/lib/libssl/src/crypto/modes/modes_lcl.h b/src/lib/libssl/src/crypto/modes/modes_lcl.h index 9057f7fd76..2fc8138273 100644 --- a/src/lib/libssl/src/crypto/modes/modes_lcl.h +++ b/src/lib/libssl/src/crypto/modes/modes_lcl.h | |||
@@ -34,7 +34,7 @@ typedef unsigned char u8; | |||
34 | # undef STRICT_ALIGNMENT | 34 | # undef STRICT_ALIGNMENT |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | #if !defined(PEDANTIC) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) | 37 | #if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
38 | #if defined(__GNUC__) && __GNUC__>=2 | 38 | #if defined(__GNUC__) && __GNUC__>=2 |
39 | # if defined(__x86_64) || defined(__x86_64__) | 39 | # if defined(__x86_64) || defined(__x86_64__) |
40 | # define BSWAP8(x) ({ u64 ret=(x); \ | 40 | # define BSWAP8(x) ({ u64 ret=(x); \ |
diff --git a/src/lib/libssl/src/crypto/pem/pem_seal.c b/src/lib/libssl/src/crypto/pem/pem_seal.c index 3c0be6d305..92b70157cd 100644 --- a/src/lib/libssl/src/crypto/pem/pem_seal.c +++ b/src/lib/libssl/src/crypto/pem/pem_seal.c | |||
@@ -186,10 +186,4 @@ err: | |||
186 | free(s); | 186 | free(s); |
187 | return (ret); | 187 | return (ret); |
188 | } | 188 | } |
189 | #else /* !OPENSSL_NO_RSA */ | ||
190 | |||
191 | # if PEDANTIC | ||
192 | static void *dummy = &dummy; | ||
193 | # endif | ||
194 | |||
195 | #endif | 189 | #endif |
diff --git a/src/lib/libssl/src/crypto/rc5/rc5_locl.h b/src/lib/libssl/src/crypto/rc5/rc5_locl.h index 314ce8909a..14086c8551 100644 --- a/src/lib/libssl/src/crypto/rc5/rc5_locl.h +++ b/src/lib/libssl/src/crypto/rc5/rc5_locl.h | |||
@@ -146,7 +146,7 @@ | |||
146 | *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ | 146 | *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ |
147 | *((c)++)=(unsigned char)(((l) )&0xff)) | 147 | *((c)++)=(unsigned char)(((l) )&0xff)) |
148 | 148 | ||
149 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(__STRICT_ANSI__) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) && !defined(PEDANTIC) | 149 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(__STRICT_ANSI__) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
150 | # if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) | 150 | # if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) |
151 | # define ROTATE_l32(a,n) ({ register unsigned int ret; \ | 151 | # define ROTATE_l32(a,n) ({ register unsigned int ret; \ |
152 | asm ("roll %%cl,%0" \ | 152 | asm ("roll %%cl,%0" \ |
diff --git a/src/lib/libssl/src/crypto/sha/sha512.c b/src/lib/libssl/src/crypto/sha/sha512.c index 49afaa05c2..ca7991a9ca 100644 --- a/src/lib/libssl/src/crypto/sha/sha512.c +++ b/src/lib/libssl/src/crypto/sha/sha512.c | |||
@@ -311,21 +311,20 @@ static const SHA_LONG64 K512[80] = { | |||
311 | U64(0x4cc5d4becb3e42b6),U64(0x597f299cfc657e2a), | 311 | U64(0x4cc5d4becb3e42b6),U64(0x597f299cfc657e2a), |
312 | U64(0x5fcb6fab3ad6faec),U64(0x6c44198c4a475817) }; | 312 | U64(0x5fcb6fab3ad6faec),U64(0x6c44198c4a475817) }; |
313 | 313 | ||
314 | #ifndef PEDANTIC | 314 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
315 | # if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) | 315 | # if defined(__x86_64) || defined(__x86_64__) |
316 | # if defined(__x86_64) || defined(__x86_64__) | 316 | # define ROTR(a,n) ({ SHA_LONG64 ret; \ |
317 | # define ROTR(a,n) ({ SHA_LONG64 ret; \ | ||
318 | asm ("rorq %1,%0" \ | 317 | asm ("rorq %1,%0" \ |
319 | : "=r"(ret) \ | 318 | : "=r"(ret) \ |
320 | : "J"(n),"0"(a) \ | 319 | : "J"(n),"0"(a) \ |
321 | : "cc"); ret; }) | 320 | : "cc"); ret; }) |
322 | # define PULL64(x) ({ SHA_LONG64 ret=*((const SHA_LONG64 *)(&(x))); \ | 321 | # define PULL64(x) ({ SHA_LONG64 ret=*((const SHA_LONG64 *)(&(x))); \ |
323 | asm ("bswapq %0" \ | 322 | asm ("bswapq %0" \ |
324 | : "=r"(ret) \ | 323 | : "=r"(ret) \ |
325 | : "0"(ret)); ret; }) | 324 | : "0"(ret)); ret; }) |
326 | # elif (defined(__i386) || defined(__i386__)) | 325 | # elif (defined(__i386) || defined(__i386__)) |
327 | # if defined(I386_ONLY) | 326 | # if defined(I386_ONLY) |
328 | # define PULL64(x) ({ const unsigned int *p=(const unsigned int *)(&(x));\ | 327 | # define PULL64(x) ({ const unsigned int *p=(const unsigned int *)(&(x));\ |
329 | unsigned int hi=p[0],lo=p[1]; \ | 328 | unsigned int hi=p[0],lo=p[1]; \ |
330 | asm("xchgb %%ah,%%al;xchgb %%dh,%%dl;"\ | 329 | asm("xchgb %%ah,%%al;xchgb %%dh,%%dl;"\ |
331 | "roll $16,%%eax; roll $16,%%edx; "\ | 330 | "roll $16,%%eax; roll $16,%%edx; "\ |
@@ -333,20 +332,19 @@ static const SHA_LONG64 K512[80] = { | |||
333 | : "=a"(lo),"=d"(hi) \ | 332 | : "=a"(lo),"=d"(hi) \ |
334 | : "0"(lo),"1"(hi) : "cc"); \ | 333 | : "0"(lo),"1"(hi) : "cc"); \ |
335 | ((SHA_LONG64)hi)<<32|lo; }) | 334 | ((SHA_LONG64)hi)<<32|lo; }) |
336 | # else | 335 | # else |
337 | # define PULL64(x) ({ const unsigned int *p=(const unsigned int *)(&(x));\ | 336 | # define PULL64(x) ({ const unsigned int *p=(const unsigned int *)(&(x));\ |
338 | unsigned int hi=p[0],lo=p[1]; \ | 337 | unsigned int hi=p[0],lo=p[1]; \ |
339 | asm ("bswapl %0; bswapl %1;" \ | 338 | asm ("bswapl %0; bswapl %1;" \ |
340 | : "=r"(lo),"=r"(hi) \ | 339 | : "=r"(lo),"=r"(hi) \ |
341 | : "0"(lo),"1"(hi)); \ | 340 | : "0"(lo),"1"(hi)); \ |
342 | ((SHA_LONG64)hi)<<32|lo; }) | 341 | ((SHA_LONG64)hi)<<32|lo; }) |
343 | # endif | 342 | # endif |
344 | # elif (defined(_ARCH_PPC) && defined(__64BIT__)) || defined(_ARCH_PPC64) | 343 | # elif (defined(_ARCH_PPC) && defined(__64BIT__)) || defined(_ARCH_PPC64) |
345 | # define ROTR(a,n) ({ SHA_LONG64 ret; \ | 344 | # define ROTR(a,n) ({ SHA_LONG64 ret; \ |
346 | asm ("rotrdi %0,%1,%2" \ | 345 | asm ("rotrdi %0,%1,%2" \ |
347 | : "=r"(ret) \ | 346 | : "=r"(ret) \ |
348 | : "r"(a),"K"(n)); ret; }) | 347 | : "r"(a),"K"(n)); ret; }) |
349 | # endif | ||
350 | # endif | 348 | # endif |
351 | #endif | 349 | #endif |
352 | 350 | ||
@@ -560,10 +558,4 @@ static void sha512_block_data_order (SHA512_CTX *ctx, const void *in, size_t num | |||
560 | 558 | ||
561 | #endif /* SHA512_ASM */ | 559 | #endif /* SHA512_ASM */ |
562 | 560 | ||
563 | #else /* !OPENSSL_NO_SHA512 */ | ||
564 | |||
565 | #if defined(PEDANTIC) || defined(__DECC) || defined(OPENSSL_SYS_MACOSX) | ||
566 | static void *dummy=&dummy; | ||
567 | #endif | ||
568 | |||
569 | #endif /* !OPENSSL_NO_SHA512 */ | 561 | #endif /* !OPENSSL_NO_SHA512 */ |