aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/rand/rand_vms.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2011-03-19 10:58:14 +0000
committerRichard Levitte <levitte@openssl.org>2011-03-19 10:58:14 +0000
commit537c982306039df02d1e9410dfe205639b547e7a (patch)
tree4fea2867dfd49eec250ecb40dd9a7339e6febff4 /crypto/rand/rand_vms.c
parent5904882eaa17be86b7d09fe5f49f1ffb8eee5e99 (diff)
downloadopenssl-537c982306039df02d1e9410dfe205639b547e7a.tar.gz
After some adjustments, apply the changes OpenSSL 1.0.0d on OpenVMS
submitted by Steven M. Schweda <sms@antinode.info>
Diffstat (limited to 'crypto/rand/rand_vms.c')
-rw-r--r--crypto/rand/rand_vms.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/crypto/rand/rand_vms.c b/crypto/rand/rand_vms.c
index 1267a3acae..0bfd8ff7e4 100644
--- a/crypto/rand/rand_vms.c
+++ b/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;
}