--------------------- PatchSet 3444 Date: 2001/12/02 20:02:20 Author: serassio Branch: cygwin Tag: (none) Log: Removed psapi.lib references, obsoleted by Cygwin 1.3.5 Members: acconfig.h:1.4.10.10->1.4.10.11 configure.in:1.8.2.27->1.8.2.28 src/Makefile.am:1.2.6.8->1.2.6.9 src/protos.h:1.9.2.21->1.9.2.22 src/tools.c:1.7.2.22->1.7.2.23 src/win32.c:1.1.50.15->1.1.50.16 Index: squid/acconfig.h =================================================================== RCS file: /cvsroot/squid-sf//squid/Attic/acconfig.h,v retrieving revision 1.4.10.10 retrieving revision 1.4.10.11 diff -u -r1.4.10.10 -r1.4.10.11 --- squid/acconfig.h 30 Nov 2001 21:06:52 -0000 1.4.10.10 +++ squid/acconfig.h 2 Dec 2001 20:02:20 -0000 1.4.10.11 @@ -23,7 +23,7 @@ #ifndef __CONFIGURE_H__ #define __CONFIGURE_H__ @TOP@ -/* $Id: acconfig.h,v 1.4.10.10 2001/11/30 21:06:52 serassio Exp $ */ +/* $Id: acconfig.h,v 1.4.10.11 2001/12/02 20:02:20 serassio Exp $ */ /* * configure command line used to configure Squid @@ -213,9 +213,6 @@ /* Define if you have struct rusage */ #undef HAVE_STRUCT_RUSAGE -/* Define if you have PSAPI.DLL on Windows systems */ -#undef HAVE_WIN32_PSAPI - /* * This makes warnings go away. If you have socklen_t defined in your * /usr/include files, then this should remain undef'd. Otherwise it Index: squid/configure.in =================================================================== RCS file: /cvsroot/squid-sf//squid/configure.in,v retrieving revision 1.8.2.27 retrieving revision 1.8.2.28 diff -u -r1.8.2.27 -r1.8.2.28 --- squid/configure.in 30 Nov 2001 21:06:52 -0000 1.8.2.27 +++ squid/configure.in 2 Dec 2001 20:02:20 -0000 1.8.2.28 @@ -3,7 +3,7 @@ dnl dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9) dnl -dnl $Id: configure.in,v 1.8.2.27 2001/11/30 21:06:52 serassio Exp $ +dnl $Id: configure.in,v 1.8.2.28 2001/12/02 20:02:20 serassio Exp $ dnl dnl dnl @@ -11,7 +11,7 @@ AC_CONFIG_AUX_DIR(cfgaux) AM_INIT_AUTOMAKE(squid, 2.5-DEVEL) AM_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.8.2.27 $)dnl +AC_REVISION($Revision: 1.8.2.28 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AM_MAINTAINER_MODE @@ -53,25 +53,6 @@ ;; esac -dnl Check for PSAPI.DLL on cygwin32 platform -case "$host_os" in -cygwin|cygwin32) - AC_PATH_PROG(WIN32_PSAPI, psapi.dll, none) - if test "$ac_cv_path_WIN32_PSAPI" = "none"; then - echo "PSAPI.DLL is reccommended to run Squid on Windows NT Platform" - echo "Please see PSAPI.DLL section on doc/win32-relnotes.txt." - WIN32_LIBS="" - else - AC_DEFINE(HAVE_WIN32_PSAPI) - WIN32_LIBS="-lpsapi" - fi - ;; -*) - WIN32_LIBS="" - ;; -esac -AC_SUBST(WIN32_LIBS) - if test -z "$CACHE_HTTP_PORT"; then CACHE_HTTP_PORT="3128" fi Index: squid/src/Makefile.am =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Makefile.am,v retrieving revision 1.2.6.8 retrieving revision 1.2.6.9 diff -u -r1.2.6.8 -r1.2.6.9 --- squid/src/Makefile.am 30 Nov 2001 21:06:53 -0000 1.2.6.8 +++ squid/src/Makefile.am 2 Dec 2001 20:02:21 -0000 1.2.6.9 @@ -220,7 +220,6 @@ @LIB_MALLOC@ \ @SSLLIB@ \ -lmiscutil \ - @WIN32_LIBS@ \ @XTRA_LIBS@ unlinkd_SOURCES = Index: squid/src/protos.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/protos.h,v retrieving revision 1.9.2.21 retrieving revision 1.9.2.22 diff -u -r1.9.2.21 -r1.9.2.22 --- squid/src/protos.h 20 Nov 2001 21:10:34 -0000 1.9.2.21 +++ squid/src/protos.h 2 Dec 2001 20:02:21 -0000 1.9.2.22 @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.9.2.21 2001/11/20 21:10:34 serassio Exp $ + * $Id: protos.h,v 1.9.2.22 2001/12/02 20:02:21 serassio Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -1325,7 +1325,6 @@ #if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) extern int WIN32_Subsystem_Init(void); extern void WIN32_Exit(void); -extern int WIN32_getrusage(int, struct rusage *); #endif #endif /* SQUID_PROTOS_H */ Index: squid/src/tools.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/tools.c,v retrieving revision 1.7.2.22 retrieving revision 1.7.2.23 diff -u -r1.7.2.22 -r1.7.2.23 --- squid/src/tools.c 20 Nov 2001 21:10:35 -0000 1.7.2.22 +++ squid/src/tools.c 2 Dec 2001 20:02:21 -0000 1.7.2.23 @@ -1,6 +1,6 @@ /* - * $Id: tools.c,v 1.7.2.22 2001/11/20 21:10:35 serassio Exp $ + * $Id: tools.c,v 1.7.2.23 2001/12/02 20:02:21 serassio Exp $ * * DEBUG: section 21 Misc Functions * AUTHOR: Harvest Derived @@ -40,10 +40,6 @@ memory informations */ -#if defined(_SQUID_CYGWIN_) -#undef getrusage -#define getrusage WIN32_getrusage -#endif #define DEAD_MSG "\ The Squid Cache (version %s) died.\n\ Index: squid/src/win32.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/win32.c,v retrieving revision 1.1.50.15 retrieving revision 1.1.50.16 diff -u -r1.1.50.15 -r1.1.50.16 --- squid/src/win32.c 21 Oct 2001 19:30:25 -0000 1.1.50.15 +++ squid/src/win32.c 2 Dec 2001 20:02:21 -0000 1.1.50.16 @@ -157,57 +157,6 @@ Set_sys_network_db_hosts(); return 0; } - -int WIN32_getrusage(int who, struct rusage *usage) -{ -#ifdef _SQUID_CYGWIN_ - getrusage(who, usage); -#endif -#if HAVE_WIN32_PSAPI - if ((WIN32_OS_version == _WIN_OS_WINNT) || (WIN32_OS_version == _WIN_OS_WIN2K) - || (WIN32_OS_version == _WIN_OS_WINXP)) - { - /* On Windows NT/2000 call PSAPI.DLL for process Memory */ - /* informations -- Guido Serassio */ - HANDLE hProcess; - PROCESS_MEMORY_COUNTERS pmc; - hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | - PROCESS_VM_READ, - FALSE, GetCurrentProcessId()); -#if defined (_SQUID_MSWIN_) - { - /* Microsoft Visual C++ doesn't have getrusage function, */ - /* so we get process CPU time information from PSAPI.DLL. */ - FILETIME ftCreate, ftExit, ftKernel, ftUser; - if (GetProcessTimes(hProcess, &ftCreate, &ftExit, &ftKernel, &ftUser)) - { - LONGLONG tUser64 = *(LONGLONG *)&ftUser; - LONGLONG tKernel64 = *(LONGLONG *)&ftKernel; - usage->ru_utime.tv_usec =(DWORD)(tUser64 / 10); - usage->ru_stime.tv_usec =(DWORD)(tKernel64 / 10); - } - else - { - CloseHandle( hProcess ); - return -1; - } - } -#endif - if (GetProcessMemoryInfo( hProcess, &pmc, sizeof(pmc))) - { - usage->ru_maxrss=(DWORD)(pmc.WorkingSetSize /1024); - usage->ru_majflt=pmc.PageFaultCount; - } - else - { - CloseHandle( hProcess ); - return -1; - } - CloseHandle( hProcess ); - } -#endif - return 0; -} #endif #endif /* WIN32_C */