diff options
author | Richard Levitte <levitte@openssl.org> | 2011-03-19 09:47:47 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2011-03-19 09:47:47 +0000 |
commit | 01d2e27a2badb0a01706fe58738df67cc7e90b9c (patch) | |
tree | 4210b520add8e3ea3f9580ab7c94f10b3402ed1d /crypto/bio/b_sock.c | |
parent | dd7aadf7b2db65de2ec1eca6e598d07864d3ace4 (diff) |
Apply all the changes submitted by Steven M. Schweda <sms@antinode.info>
Diffstat (limited to 'crypto/bio/b_sock.c')
-rw-r--r-- | crypto/bio/b_sock.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c index 12b0a53a81..54112e6ebe 100644 --- a/crypto/bio/b_sock.c +++ b/crypto/bio/b_sock.c @@ -551,7 +551,30 @@ int BIO_socket_ioctl(int fd, long type, void *arg) #ifdef __DJGPP__ i=ioctlsocket(fd,type,(char *)arg); #else - i=ioctlsocket(fd,type,arg); +# if defined(OPENSSL_SYS_VMS) + /* 2011-02-18 SMS. + * VMS ioctl() can't tolerate a 64-bit "void *arg", but we + * observe that all the consumers pass in an "unsigned long *", + * so we arrange a local copy with a short pointer, and use + * that, instead. + */ +# if __INITIAL_POINTER_SIZE == 64 +# define ARG arg_32p +# pragma pointer_size save +# pragma pointer_size 32 + unsigned long arg_32; + unsigned long *arg_32p; +# pragma pointer_size restore + arg_32p = &arg_32; + arg_32 = *((unsigned long *) arg); +# else /* __INITIAL_POINTER_SIZE == 64 */ +# define ARG arg +# endif /* __INITIAL_POINTER_SIZE == 64 [else] */ +# else /* defined(OPENSSL_SYS_VMS) */ +# define ARG arg +# endif /* defined(OPENSSL_SYS_VMS) [else] */ + + i=ioctlsocket(fd,type,ARG); #endif /* __DJGPP__ */ if (i < 0) SYSerr(SYS_F_IOCTLSOCKET,get_last_socket_error()); |