From: serassio <> Date: Sun, 28 Aug 2005 00:40:20 +0000 (+0000) Subject: Merge of latest Windows specific updates from nt-3_0 branch: X-Git-Tag: SQUID_3_0_PRE4~667 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=629b5f75145e56224f1438dba173b22159e0b85c;p=thirdparty%2Fsquid.git Merge of latest Windows specific updates from nt-3_0 branch: - Some Cygwin fixes - Added Windows handle into fde Class --- diff --git a/src/comm.cc b/src/comm.cc index 4dc650abbd..d5694b26b7 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -1,6 +1,6 @@ /* - * $Id: comm.cc,v 1.407 2005/08/25 19:30:01 wessels Exp $ + * $Id: comm.cc,v 1.408 2005/08/27 18:40:20 serassio Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -1942,13 +1942,21 @@ commSetNonBlocking(int fd) int nonblocking = TRUE; +#ifdef _SQUID_CYGWIN_ + if (fd_table[fd].type != FD_PIPE) { +#endif + if (ioctl(fd, FIONBIO, &nonblocking) < 0) { debug(50, 0) ("commSetNonBlocking: FD %d: %s %d\n", fd, xstrerror(), fd_table[fd].type); return COMM_ERROR; } + +#ifdef _SQUID_CYGWIN_ + } else { #endif +#endif #ifndef _SQUID_MSWIN_ if ((flags = fcntl(fd, F_GETFL, dummy)) < 0) { @@ -1962,7 +1970,7 @@ commSetNonBlocking(int fd) } #endif -#ifdef _SQUID_WIN32_ +#ifdef _SQUID_CYGWIN_ } diff --git a/src/fd.cc b/src/fd.cc index f2fbf5e979..fa17b6365b 100644 --- a/src/fd.cc +++ b/src/fd.cc @@ -1,6 +1,6 @@ /* - * $Id: fd.cc,v 1.52 2005/01/06 13:16:39 serassio Exp $ + * $Id: fd.cc,v 1.53 2005/08/27 18:40:20 serassio Exp $ * * DEBUG: section 51 Filedescriptor Functions * AUTHOR: Duane Wessels @@ -166,6 +166,8 @@ fd_open(int fd, unsigned int type, const char *desc) F->epoll_state = 0; #ifdef _SQUID_MSWIN_ + F->win32.handle = _get_osfhandle(fd); + switch (type) { case FD_SOCKET: diff --git a/src/fde.h b/src/fde.h index faaf8ee50c..cac05c73bf 100644 --- a/src/fde.h +++ b/src/fde.h @@ -1,6 +1,6 @@ /* - * $Id: fde.h,v 1.8 2005/04/18 21:52:42 hno Exp $ + * $Id: fde.h,v 1.9 2005/08/27 18:40:20 serassio Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -121,6 +121,17 @@ unsigned int write_pending: SSL *ssl; #endif +#ifdef _SQUID_MSWIN_ + + struct + { + + long handle; + } + + win32; +#endif + }; #endif /* SQUID_FDE_H */