diff options
author | marha <marha@users.sourceforge.net> | 2011-09-30 08:46:36 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-09-30 08:46:36 +0200 |
commit | 73d82f7ac0d1add2697128c2e26c2432ffe172a5 (patch) | |
tree | c6436b57a2191c57320396c37449109ebad745ec /openssl/crypto/rand | |
parent | 4a9e1f51655e03da1507dabce7c4c3960e7ca607 (diff) | |
parent | 60adbfdea1ee754341d64454274e7aa83bae8971 (diff) | |
download | vcxsrv-73d82f7ac0d1add2697128c2e26c2432ffe172a5.tar.gz vcxsrv-73d82f7ac0d1add2697128c2e26c2432ffe172a5.tar.bz2 vcxsrv-73d82f7ac0d1add2697128c2e26c2432ffe172a5.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
openssl/Makefile
Diffstat (limited to 'openssl/crypto/rand')
-rw-r--r-- | openssl/crypto/rand/rand_vms.c | 16 | ||||
-rw-r--r-- | openssl/crypto/rand/randfile.c | 2 |
2 files changed, 16 insertions, 2 deletions
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; } diff --git a/openssl/crypto/rand/randfile.c b/openssl/crypto/rand/randfile.c index f9b709e6d..bc7d9c580 100644 --- a/openssl/crypto/rand/randfile.c +++ b/openssl/crypto/rand/randfile.c @@ -144,7 +144,9 @@ int RAND_load_file(const char *file, long bytes) * I/O because we will waste system entropy. */ bytes = (bytes == -1) ? 2048 : bytes; /* ok, is 2048 enough? */ +#ifndef OPENSSL_NO_SETVBUF_IONBF setvbuf(in, NULL, _IONBF, 0); /* don't do buffered reads */ +#endif /* ndef OPENSSL_NO_SETVBUF_IONBF */ } #endif for (;;) |