]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Merge of latest Windows specific updates from nt-3_0 branch:
authorserassio <>
Sun, 28 Aug 2005 00:40:20 +0000 (00:40 +0000)
committerserassio <>
Sun, 28 Aug 2005 00:40:20 +0000 (00:40 +0000)
- Some Cygwin fixes
- Added Windows handle into fde Class

src/comm.cc
src/fd.cc
src/fde.h

index 4dc650abbddac8e1353ab76e94bef598e95d5cf3..d5694b26b7a7a4c6c6ea8ba4c466eceb702214fc 100644 (file)
@@ -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_
 
     }
 
index f2fbf5e9796e169567818e44e2a19531be8defd0..fa17b6365bff0d126b4e070f507f901a78cb7a97 100644 (file)
--- 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:
index faaf8ee50c77f5cb30f878889f3fadadf621b6de..cac05c73bf754cbc2a6b282a13360518ab0bb24f 100644 (file)
--- 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 */