lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev djgpp/Watt-32 non-blocking patch


From: Gisle Vanem
Subject: lynx-dev djgpp/Watt-32 non-blocking patch
Date: Mon, 11 Nov 2002 03:59:05 +0100

* HTtcp.c patch to make djgpp/Watt-32 non-blocking connect in
  HTDoConnect(). This allows pressing 'z' to abort connections.
  Removed extra _HTProgress() for INET6; it overwrote previous progress
  message.

--------------------------------------------------------------------------------

diff -B -H -u3 ./orig/httcp.c ./httcp.c
--- ./orig/httcp.c   Mon Oct  7 00:43:28 2002
+++ httcp.c          Mon Nov 11 02:09:36 2002
@@ -1565,7 +1565,6 @@
     _HTProgress (line);
 #ifdef INET6
     /* HTParseInet() is useless! */
-    _HTProgress(host);
     res0 = HTGetAddrInfo(host, default_port);
     if (res0 == NULL) {
  HTSprintf0 (&line, gettext("Unable to locate remote host %s."), host);
@@ -1627,7 +1626,7 @@
     }
 #endif /* INET6 */
 
-#ifndef DOSPATH
+#if !defined(DOSPATH) || defined(__DJGPP__)
 #if !defined(NO_IOCTL) || defined(USE_FCNTL)
     /*
     ** Make the socket non-blocking, so the connect can be canceled.
@@ -1645,7 +1644,7 @@
      _HTProgress(gettext("Could not make connection non-blocking."));
     }
 #endif /* !NO_IOCTL || USE_FCNTL */
-#endif /* !DOSPATH */
+#endif /* !DOSPATH || __DJGPP__ */
 
     /*
     ** Issue the connect.  Since the server can't do an instantaneous
@@ -1671,7 +1670,7 @@
 #else
     status = connect(*s, (struct sockaddr*)&soc_address, sizeof(soc_address));
 #endif /* INET6 */
-#ifndef __DJGPP__
+
     /*
     ** According to the Sun man page for connect:
     **    EINPROGRESS        The socket is non-blocking and the  con-
@@ -1878,7 +1877,7 @@
  break;
     }
 #endif /* INET6 */
-#endif /* !__DJGPP__ */
+
 #ifdef INET6
     if (*s < 0)
 #else
@@ -1891,7 +1890,7 @@
  */
  NETCLOSE(*s);
     }
-#ifndef DOSPATH
+#if !defined(DOSPATH) || defined(__DJGPP__)
 #if !defined(NO_IOCTL) || defined(USE_FCNTL)
     else {
  /*
@@ -1907,7 +1906,7 @@
      _HTProgress(gettext("Could not restore socket to blocking."));
     }
 #endif /* !NO_IOCTL || USE_FCNTL */
-#endif /* !DOSPATH */
+#endif /* !DOSPATH || __DJGPP__ */
 
 #ifdef INET6
     FREE(line);



diff -B -H -u3 ./www_tcp.h ./orig/www_tcp.h
--- ./orig/www_tcp.h Mon Oct  7 00:43:28 2002
+++ ./www_tcp.h      Sun Nov 10 23:59:58 2002
@@ -549,7 +549,8 @@
 #ifdef __DJGPP__
 #undef SELECT
 #define TCP_INCLUDES_DONE
-#define NO_IOCTL
+#undef  IOCTL
+#define IOCTL(s,cmd,arg) ioctlsocket(s,cmd,(char*)(arg))
 #define DECL_ERRNO
 #include <errno.h>
 #include <sys/types.h>

--------------------------------------------------------------------------------

Gisle V.

Gisle V.


; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]