From 60adbfdea1ee754341d64454274e7aa83bae8971 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 30 Sep 2011 08:40:25 +0200 Subject: Upgraded to openssl-1.0.0e --- openssl/crypto/rand/rand_vms.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'openssl/crypto/rand/rand_vms.c') diff --git a/openssl/crypto/rand/rand_vms.c b/openssl/crypto/rand/rand_vms.c index 1267a3aca..0bfd8ff7e 100644 --- a/openssl/crypto/rand/rand_vms.c +++ b/openssl/crypto/rand/rand_vms.c @@ -69,6 +69,17 @@ # pragma message disable DOLLARID #endif +/* Use 32-bit pointers almost everywhere. Define the type to which to + * cast a pointer passed to an external function. + */ +#if __INITIAL_POINTER_SIZE == 64 +# define PTR_T __void_ptr64 +# pragma pointer_size save +# pragma pointer_size 32 +#else /* __INITIAL_POINTER_SIZE == 64 */ +# define PTR_T void * +#endif /* __INITIAL_POINTER_SIZE == 64 [else] */ + static struct items_data_st { short length, code; /* length is amount of bytes */ @@ -125,11 +136,12 @@ int RAND_poll(void) { if (status == SS$_NORMAL) { - RAND_add(data_buffer, total_length, total_length/2); + RAND_add( (PTR_T)data_buffer, total_length, + total_length/2); } } sys$gettim(iosb); - RAND_add((unsigned char *)iosb, sizeof(iosb), sizeof(iosb)/2); + RAND_add( (PTR_T)iosb, sizeof(iosb), sizeof(iosb)/2); return 1; } -- cgit v1.2.3