Use recv() and send() for socket communication on VMS instead of read()
authorRichard Levitte <levitte@openssl.org>
Sat, 6 Apr 2002 11:35:49 +0000 (11:35 +0000)
committerRichard Levitte <levitte@openssl.org>
Sat, 6 Apr 2002 11:35:49 +0000 (11:35 +0000)
and write().  The reason is that read() and write() make additional record
level locking which causes hangs of Compaq Secure Web Server (Apache) with
SSL.
Submitted by Compaq.

e_os.h

diff --git a/e_os.h b/e_os.h
index 0bb2bfa69323672cd1e894ba7da0ab1a02a65da8..4436495c692c1b2defa445f0898ec7beb2337958 100644 (file)
--- a/e_os.h
+++ b/e_os.h
@@ -160,6 +160,13 @@ extern "C" {
 #define closesocket(s)         MacSocket_close(s)
 #define readsocket(s,b,n)      MacSocket_recv((s),(b),(n),true)
 #define writesocket(s,b,n)     MacSocket_send((s),(b),(n))
+#elif defined(VMS)
+#define get_last_socket_error() errno
+#define clear_socket_error()    errno=0
+#define ioctlsocket(a,b,c)      ioctl(a,b,c)
+#define closesocket(s)          close(s)
+#define readsocket(s,b,n)       recv((s),(b),(n),0)
+#define writesocket(s,b,n)      send((s),(b),(n),0)
 #else
 #define get_last_socket_error()        errno
 #define clear_socket_error()   errno=0