--------------------- PatchSet 3867 Date: 2002/04/04 21:48:52 Author: serassio Branch: nt-2_5 Tag: (none) Log: Latest WIN32 code refines Members: port/win32/include/squid-mswin.h:1.1.2.5->1.1.2.6 src/cache_manager.c:1.7.62.2->1.7.62.3 src/client_side.c:1.47.2.1.4.3->1.47.2.1.4.4 src/main.c:1.28.6.1.4.3->1.28.6.1.4.4 src/win32.c:1.5.14.4->1.5.14.5 src/fs/awin32/store_dir_aufs.c:1.1.62.1->1.1.62.2 Index: squid/port/win32/include/squid-mswin.h =================================================================== RCS file: /cvsroot/squid-sf//squid/port/win32/include/Attic/squid-mswin.h,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -u -r1.1.2.5 -r1.1.2.6 --- squid/port/win32/include/squid-mswin.h 4 Apr 2002 19:40:22 -0000 1.1.2.5 +++ squid/port/win32/include/squid-mswin.h 4 Apr 2002 21:48:52 -0000 1.1.2.6 @@ -1,5 +1,5 @@ /* - * $Id: squid-mswin.h,v 1.1.2.5 2002/04/04 19:40:22 serassio Exp $ + * $Id: squid-mswin.h,v 1.1.2.6 2002/04/04 21:48:52 serassio Exp $ * * AUTHOR: Guido Serassio & Andrey Shorin * @@ -253,19 +253,19 @@ } #define select(n,r,w,e,t) \ (SOCKET_ERROR == (ws32_result = select(n,r,w,e,t)) ? \ - ((errno = WSAGetLastError()), -1) : ws32_result) + (errno = WSAGetLastError()), -1 : ws32_result) #define recv(s,b,l,f) \ (SOCKET_ERROR == (ws32_result = recv(_get_osfhandle(s),b,l,f)) ? \ - ((errno = WSAGetLastError()), -1) : ws32_result) + (errno = WSAGetLastError()), -1 : ws32_result) #define recvfrom(s,b,l,f,fr,frl) \ (SOCKET_ERROR == (ws32_result = recvfrom(_get_osfhandle(s),b,l,f,fr,frl)) ? \ - ((errno = WSAGetLastError()), -1) : ws32_result) + (errno = WSAGetLastError()), -1 : ws32_result) #define send(s,b,l,f) \ (SOCKET_ERROR == (ws32_result = send(_get_osfhandle(s),b,l,f)) ? \ - ((errno = WSAGetLastError()), -1) : ws32_result) + (errno = WSAGetLastError()), -1 : ws32_result) #define sendto(s,b,l,f,t,tl) \ (SOCKET_ERROR == (ws32_result = sendto(_get_osfhandle(s),b,l,f,t,tl)) ? \ - ((errno = WSAGetLastError()), -1) : ws32_result) + (errno = WSAGetLastError()), -1 : ws32_result) #define getsockname(s,n,l) \ (SOCKET_ERROR == getsockname(_get_osfhandle(s),n,l) ? \ (errno = WSAGetLastError()), -1 : 0) Index: squid/src/cache_manager.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/cache_manager.c,v retrieving revision 1.7.62.2 retrieving revision 1.7.62.3 diff -u -r1.7.62.2 -r1.7.62.3 --- squid/src/cache_manager.c 4 Apr 2002 19:40:22 -0000 1.7.62.2 +++ squid/src/cache_manager.c 4 Apr 2002 21:48:53 -0000 1.7.62.3 @@ -1,6 +1,6 @@ /* - * $Id: cache_manager.c,v 1.7.62.2 2002/04/04 19:40:22 serassio Exp $ + * $Id: cache_manager.c,v 1.7.62.3 2002/04/04 21:48:53 serassio Exp $ * * DEBUG: section 16 Cache Manager Objects * AUTHOR: Duane Wessels @@ -63,6 +63,10 @@ static char *cachemgrPasswdGet(cachemgr_passwd *, const char *); static const char *cachemgrActionProtection(const action_table * at); static OBJH cachemgrShutdown; +static OBJH cachemgrReconfigure; +#if defined(_SQUID_MSWIN_) && defined(_DEBUG) +static OBJH cachemgrBreak; +#endif static OBJH cachemgrMenu; static OBJH cachemgrOfflineToggle; Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.47.2.1.4.3 retrieving revision 1.47.2.1.4.4 diff -u -r1.47.2.1.4.3 -r1.47.2.1.4.4 --- squid/src/client_side.c 4 Apr 2002 19:52:56 -0000 1.47.2.1.4.3 +++ squid/src/client_side.c 4 Apr 2002 21:48:53 -0000 1.47.2.1.4.4 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.47.2.1.4.3 2002/04/04 19:52:56 serassio Exp $ + * $Id: client_side.c,v 1.47.2.1.4.4 2002/04/04 21:48:53 serassio Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -2034,7 +2034,7 @@ * This hack may hit performance a little, but it's better than * blocking!. */ -#if defined(_SQUID_CYGWIN_) || defined(_SQUID_MSWIN_) +#ifdef _SQUID_CYGWIN_ commSetSelect(conn->fd, COMM_SELECT_READ, clientReadRequest, conn, 0); #else clientReadRequest(conn->fd, conn); /* Read next request */ Index: squid/src/main.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/main.c,v retrieving revision 1.28.6.1.4.3 retrieving revision 1.28.6.1.4.4 diff -u -r1.28.6.1.4.3 -r1.28.6.1.4.4 --- squid/src/main.c 4 Apr 2002 19:40:22 -0000 1.28.6.1.4.3 +++ squid/src/main.c 4 Apr 2002 21:48:53 -0000 1.28.6.1.4.4 @@ -1,6 +1,6 @@ /* - * $Id: main.c,v 1.28.6.1.4.3 2002/04/04 19:40:22 serassio Exp $ + * $Id: main.c,v 1.28.6.1.4.4 2002/04/04 21:48:53 serassio Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -814,11 +814,7 @@ comm_init(); comm_select_init(); -#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) - if ((WIN32_run_mode == _WIN_SQUID_RUN_MODE_INTERACTIVE) && (opt_no_daemon)) { -#else if (opt_no_daemon) { -#endif /* we have to init fdstat here. */ fd_open(0, FD_LOG, "stdin"); fd_open(1, FD_LOG, "stdout"); @@ -838,6 +834,11 @@ if (do_reconfigure) { mainReconfigure(); do_reconfigure = 0; +#if defined(_SQUID_MSWIN_) && defined(_DEBUG) + } else if (do_debug) { + do_debug = 0; + __asm int 3; +#endif } else if (do_rotate) { mainRotate(); do_rotate = 0; Index: squid/src/win32.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/win32.c,v retrieving revision 1.5.14.4 retrieving revision 1.5.14.5 diff -u -r1.5.14.4 -r1.5.14.5 --- squid/src/win32.c 4 Apr 2002 19:40:23 -0000 1.5.14.4 +++ squid/src/win32.c 4 Apr 2002 21:48:53 -0000 1.5.14.5 @@ -394,9 +394,6 @@ *argc = WIN32_argc; *argv = WIN32_argv; #ifdef _SQUID_MSWIN_ - close(0); - close(1); - close(2); _setmaxstdio(Squid_MaxFD); #endif } Index: squid/src/fs/awin32/store_dir_aufs.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/fs/awin32/Attic/store_dir_aufs.c,v retrieving revision 1.1.62.1 retrieving revision 1.1.62.2 diff -u -r1.1.62.1 -r1.1.62.2 --- squid/src/fs/awin32/store_dir_aufs.c 14 Mar 2002 20:23:47 -0000 1.1.62.1 +++ squid/src/fs/awin32/store_dir_aufs.c 4 Apr 2002 21:48:53 -0000 1.1.62.2 @@ -1,6 +1,6 @@ /* - * $Id: store_dir_aufs.c,v 1.1.62.1 2002/03/14 20:23:47 serassio Exp $ + * $Id: store_dir_aufs.c,v 1.1.62.2 2002/04/04 21:48:53 serassio Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -951,9 +951,10 @@ storeAufsDirWriteCleanStart(SwapDir * sd) { struct _clean_state *state = xcalloc(1, sizeof(*state)); -#if HAVE_FCHMOD +#if HAVE_FCHMOD struct stat sb; -#endif +#endif + sd->log.clean.write = NULL; sd->log.clean.state = NULL; state->new = xstrdup(storeAufsDirSwapLogFile(sd, ".clean")); @@ -1028,6 +1029,7 @@ safe_free(state); sd->log.clean.state = NULL; sd->log.clean.write = NULL; + return; } state->outbuf_offset = 0; } @@ -1587,7 +1589,8 @@ static int storeAufsCleanupDoubleCheck(SwapDir * sd, StoreEntry * e) { -#ifndef _SQUID_MSWIN_ +#ifndef _SQUID_MSWIN_ + struct stat sb; if (stat(storeAufsDirFullPath(sd, e->swap_filen, NULL), &sb) < 0) { debug(20, 0) ("storeAufsCleanupDoubleCheck: MISSING SWAP FILE\n"); @@ -1607,7 +1610,8 @@ storeEntryDump(e, 0); return -1; } -#endif +#endif + return 0; }