VMS support bug fixes.
authorUlf Möller <ulf@openssl.org>
Thu, 13 May 1999 13:21:17 +0000 (13:21 +0000)
committerUlf Möller <ulf@openssl.org>
Thu, 13 May 1999 13:21:17 +0000 (13:21 +0000)
apps/s_client.c
apps/s_server.c
apps/s_socket.c
apps/s_time.c
crypto/bio/b_sock.c
crypto/bio/bss_acpt.c
crypto/bio/bss_conn.c

index 594ee7ea16b47d6a8c1965993a891f166bbc3d7c..cea00788a6a75dbc99ae8681296c5c7ef16a6195 100644 (file)
@@ -79,8 +79,8 @@ typedef unsigned int u_int;
 #include <openssl/pem.h>
 #include "s_apps.h"
 
 #include <openssl/pem.h>
 #include "s_apps.h"
 
-#if (__VMS_VER < 70000000) /* FIONBIO used as a switch to enable ioctl,
-                             and that isn't in VMS < 7.0 */
+#if (defined(VMS) && __VMS_VER < 70000000)
+/* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */
 #undef FIONBIO
 #endif
 
 #undef FIONBIO
 #endif
 
@@ -468,7 +468,7 @@ re_start:
 /*                     printf("mode tty(%d %d%d) ssl(%d%d)\n",
                                tty_on,read_tty,write_tty,read_ssl,write_ssl);*/
 
 /*                     printf("mode tty(%d %d%d) ssl(%d%d)\n",
                                tty_on,read_tty,write_tty,read_ssl,write_ssl);*/
 
-                       /* Note: under VMS with SOCKETSHR the third parameter
+                       /* Note: under VMS with SOCKETSHR the second parameter
                         * is currently of type (int *) whereas under other
                         * systems it is (void *) if you don't have a cast it
                         * will choke the compiler: if you do have a cast then
                         * is currently of type (int *) whereas under other
                         * systems it is (void *) if you don't have a cast it
                         * will choke the compiler: if you do have a cast then
index 5004b6fc0eed1d101134ec0e7a765a2a79a2b3c0..42ca408ce35093d8a330ff9c71db79e938340cf5 100644 (file)
@@ -83,8 +83,8 @@ typedef unsigned int u_int;
 #include <openssl/ssl.h>
 #include "s_apps.h"
 
 #include <openssl/ssl.h>
 #include "s_apps.h"
 
-#if (__VMS_VER < 70000000) /* FIONBIO used as a switch to enable ioctl,
-                             and that isn't in VMS < 7.0 */
+#if (defined(VMS) && __VMS_VER < 70000000)
+/* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */
 #undef FIONBIO
 #endif
 
 #undef FIONBIO
 #endif
 
@@ -628,7 +628,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
                FD_SET(fileno(stdin),&readfds);
 #endif
                FD_SET(s,&readfds);
                FD_SET(fileno(stdin),&readfds);
 #endif
                FD_SET(s,&readfds);
-               /* Note: under VMS with SOCKETSHR the third parameter is
+               /* Note: under VMS with SOCKETSHR the second parameter is
                 * currently of type (int *) whereas under other systems
                 * it is (void *) if you don't have a cast it will choke
                 * the compiler: if you do have a cast then you can either
                 * currently of type (int *) whereas under other systems
                 * it is (void *) if you don't have a cast it will choke
                 * the compiler: if you do have a cast then you can either
index 1d8587f1f5c11853684ca5e952d1997ad5180c1a..99a94633aad9fce140f7b8d65ce5507c50a9b3e7 100644 (file)
@@ -78,12 +78,12 @@ typedef unsigned int u_int;
 #include "s_apps.h"
 #include <openssl/ssl.h>
 
 #include "s_apps.h"
 #include <openssl/ssl.h>
 
+#ifdef VMS
 #if (__VMS_VER < 70000000) /* FIONBIO used as a switch to enable ioctl,
                              and that isn't in VMS < 7.0 */
 #undef FIONBIO
 #endif
 #if (__VMS_VER < 70000000) /* FIONBIO used as a switch to enable ioctl,
                              and that isn't in VMS < 7.0 */
 #undef FIONBIO
 #endif
-#ifdef VMS /* for vfork() */
-#include <processes.h>
+#include <processes.h> /* for vfork() */
 #endif
 
 static struct hostent *GetHostByName(char *name);
 #endif
 
 static struct hostent *GetHostByName(char *name);
@@ -255,7 +255,9 @@ int nbio_init_client_ip(int *sock, unsigned char ip[4], int port)
 
        if (*sock <= 0)
                {
 
        if (*sock <= 0)
                {
+#ifdef FIONBIO
                unsigned long l=1;
                unsigned long l=1;
+#endif
 
                s=socket(AF_INET,SOCK_STREAM,SOCKET_PROTOCOL);
                if (s == INVALID_SOCKET) { perror("socket"); return(0); }
 
                s=socket(AF_INET,SOCK_STREAM,SOCKET_PROTOCOL);
                if (s == INVALID_SOCKET) { perror("socket"); return(0); }
@@ -387,7 +389,7 @@ redoit:
 
        memset((char *)&from,0,sizeof(from));
        len=sizeof(from);
 
        memset((char *)&from,0,sizeof(from));
        len=sizeof(from);
-       /* Note: under VMS with SOCKETSHR the third parameter is currently
+       /* Note: under VMS with SOCKETSHR the fourth parameter is currently
         * of type (int *) whereas under other systems it is (void *) if
         * you don't have a cast it will choke the compiler: if you do
         * have a cast then you can either go for (int *) or (void *).
         * of type (int *) whereas under other systems it is (void *) if
         * you don't have a cast it will choke the compiler: if you do
         * have a cast then you can either go for (int *) or (void *).
index 9da140d05a1834b37e51ed94b60897d537500f6a..15b519aa3824e7d360c937f58043cd77fd48d733 100644 (file)
@@ -668,7 +668,7 @@ static SSL *doConnection(SSL *scon)
                        width=i+1;
                        FD_ZERO(&readfds);
                        FD_SET(i,&readfds);
                        width=i+1;
                        FD_ZERO(&readfds);
                        FD_SET(i,&readfds);
-                       /* Note: under VMS with SOCKETSHR the third parameter
+                       /* Note: under VMS with SOCKETSHR the 2nd parameter
                         * is currently of type (int *) whereas under other
                         * systems it is (void *) if you don't have a cast it
                         * will choke the compiler: if you do have a cast then
                         * is currently of type (int *) whereas under other
                         * systems it is (void *) if you don't have a cast it
                         * will choke the compiler: if you do have a cast then
index 07c9edd33c3ef9df55817fb810e16989e1963566..b8cc7951468660eaf35920fd028488ae95df8dc5 100644 (file)
@@ -596,7 +596,7 @@ int BIO_accept(int sock, char **addr)
 
        memset((char *)&from,0,sizeof(from));
        len=sizeof(from);
 
        memset((char *)&from,0,sizeof(from));
        len=sizeof(from);
-       /* Note: under VMS with SOCKETSHR the third parameter is currently
+       /* Note: under VMS with SOCKETSHR the fourth parameter is currently
         * of type (int *) whereas under other systems it is (void *) if
         * you don't have a cast it will choke the compiler: if you do
         * have a cast then you can either go for (int *) or (void *).
         * of type (int *) whereas under other systems it is (void *) if
         * you don't have a cast it will choke the compiler: if you do
         * have a cast then you can either go for (int *) or (void *).
index e6961f2305082b0eea607ba0697664bb3c446cd7..50a4eb41f2e167ef7ebb71863d19e179542bdf19 100644 (file)
@@ -70,8 +70,8 @@
 #define SOCKET_PROTOCOL IPPROTO_TCP
 #endif
 
 #define SOCKET_PROTOCOL IPPROTO_TCP
 #endif
 
-#if (__VMS_VER < 70000000) /* FIONBIO used as a switch to enable ioctl, 
-                             and that isn't in VMS < 7.0 */
+#if (defined(VMS) && __VMS_VER < 70000000)
+/* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */
 #undef FIONBIO
 #endif
 
 #undef FIONBIO
 #endif
 
index 21c379ed1a3209e19e207b1e7ed94dc42eaa3d2b..7080cfdd59b4a61809dd6d970c10d3e667763b6e 100644 (file)
@@ -70,8 +70,8 @@
 #define SOCKET_PROTOCOL IPPROTO_TCP
 #endif
 
 #define SOCKET_PROTOCOL IPPROTO_TCP
 #endif
 
-#if (__VMS_VER < 70000000) /* FIONBIO used as a switch to enable ioctl,
-                             and that isn't in VMS < 7.0 */
+#if (defined(VMS) && __VMS_VER < 70000000)
+/* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */
 #undef FIONBIO
 #endif
 
 #undef FIONBIO
 #endif