#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
/* 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
#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
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
#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
-#ifdef VMS /* for vfork() */
-#include <processes.h>
+#include <processes.h> /* for vfork() */
#endif
static struct hostent *GetHostByName(char *name);
if (*sock <= 0)
{
+#ifdef FIONBIO
unsigned long l=1;
+#endif
s=socket(AF_INET,SOCK_STREAM,SOCKET_PROTOCOL);
if (s == INVALID_SOCKET) { perror("socket"); return(0); }
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 *).
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
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 *).
#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
#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