diff options
Diffstat (limited to 'src/lib/libcrypto/bn/bn.h')
-rw-r--r-- | src/lib/libcrypto/bn/bn.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/libcrypto/bn/bn.h b/src/lib/libcrypto/bn/bn.h index e484b7fc11..a0bc47837d 100644 --- a/src/lib/libcrypto/bn/bn.h +++ b/src/lib/libcrypto/bn/bn.h | |||
@@ -253,6 +253,24 @@ extern "C" { | |||
253 | #define BN_HEX_FMT2 "%08X" | 253 | #define BN_HEX_FMT2 "%08X" |
254 | #endif | 254 | #endif |
255 | 255 | ||
256 | /* 2011-02-22 SMS. | ||
257 | * In various places, a size_t variable or a type cast to size_t was | ||
258 | * used to perform integer-only operations on pointers. This failed on | ||
259 | * VMS with 64-bit pointers (CC /POINTER_SIZE = 64) because size_t is | ||
260 | * still only 32 bits. What's needed in these cases is an integer type | ||
261 | * with the same size as a pointer, which size_t is not certain to be. | ||
262 | * The only fix here is VMS-specific. | ||
263 | */ | ||
264 | #if defined(OPENSSL_SYS_VMS) | ||
265 | # if __INITIAL_POINTER_SIZE == 64 | ||
266 | # define PTR_SIZE_INT long long | ||
267 | # else /* __INITIAL_POINTER_SIZE == 64 */ | ||
268 | # define PTR_SIZE_INT int | ||
269 | # endif /* __INITIAL_POINTER_SIZE == 64 [else] */ | ||
270 | #else /* defined(OPENSSL_SYS_VMS) */ | ||
271 | # define PTR_SIZE_INT size_t | ||
272 | #endif /* defined(OPENSSL_SYS_VMS) [else] */ | ||
273 | |||
256 | #define BN_DEFAULT_BITS 1280 | 274 | #define BN_DEFAULT_BITS 1280 |
257 | 275 | ||
258 | #define BN_FLG_MALLOCED 0x01 | 276 | #define BN_FLG_MALLOCED 0x01 |