--------------------- PatchSet 4503 Date: 2002/07/16 09:33:59 Author: serassio Branch: nt-2_5 Tag: (none) Log: WIN32 source cleanup Members: helpers/external_acl/win32_group/win32_check_group.c:1.1.8.2->1.1.8.3 helpers/external_acl/win32_group/win32_check_group.h:1.1->1.1.6.1 src/helper.c:1.16.10.6->1.16.10.7 Index: squid/helpers/external_acl/win32_group/win32_check_group.c =================================================================== RCS file: /cvsroot/squid-sf//squid/helpers/external_acl/win32_group/Attic/win32_check_group.c,v retrieving revision 1.1.8.2 retrieving revision 1.1.8.3 diff -u -r1.1.8.2 -r1.1.8.3 --- squid/helpers/external_acl/win32_group/win32_check_group.c 7 Jul 2002 19:51:18 -0000 1.1.8.2 +++ squid/helpers/external_acl/win32_group/win32_check_group.c 16 Jul 2002 09:34:22 -0000 1.1.8.3 @@ -1,5 +1,5 @@ /* - * $Id: win32_check_group.c,v 1.1.8.2 2002/07/07 19:51:18 serassio Exp $ + * $Id: win32_check_group.c,v 1.1.8.3 2002/07/16 09:34:22 serassio Exp $ * * This is a helper for the external ACL interface for Squid Cache * Copyright (C) 2002 Guido Serassio @@ -165,7 +165,7 @@ */ status = LsaQueryInformationPolicy(PolicyHandle, PolicyPrimaryDomainInformation, - &ppdiDomainInfo); + (PVOID *)&ppdiDomainInfo); if (status) { debug("LsaQueryInformationPolicy Error: %d\n", status); } else { --- /dev/null Wed Feb 14 01:00:00 2007 +++ squid/helpers/external_acl/win32_group/win32_check_group.h Wed Feb 14 01:00:02 2007 @@ -0,0 +1,78 @@ +/* + * (C) 2002 Guido Serassio + * Based on previous work of Francesco Chemolli, Robert Collins and Andrew Doran + * + * Distributed freely under the terms of the GNU General Public License, + * version 2. See the file COPYING for licensing details + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. + */ + +#undef debug + +/************* CONFIGURATION ***************/ +/* + * define this if you want debugging + */ +#ifndef DEBUG +#define DEBUG +#endif + +/************* END CONFIGURATION ***************/ + +#include + +/* Debugging stuff */ + +#ifdef __GNUC__ /* this is really a gcc-ism */ +#ifdef DEBUG +#include +#include +static char *__foo; +extern char debug_enabled; +#define debug(X...) if (debug_enabled) { \ + fprintf(stderr,"%s[%d](%s:%d): ", myname, mypid, \ + ((__foo=strrchr(__FILE__,'/'))==NULL?__FILE__:__foo+1),\ + __LINE__);\ + fprintf(stderr,X); } +#else /* DEBUG */ +#define debug(X...) /* */ +#endif /* DEBUG */ +#else /* __GNUC__ */ +extern char debug_enabled; +static void +debug(char *format,...) +{ +#ifdef DEBUG +#ifdef _SQUID_MSWIN_ + if (debug_enabled) { + va_list args; + + va_start(args,format); + fprintf(stderr, "%s[%d]: ", myname, mypid); + vfprintf(stderr, format, args); + fprintf(stderr, "\n"); + va_end(args); + } +#endif /* _SQUID_MSWIN_ */ +#endif /* DEBUG */ +} +#endif /* __GNUC__ */ + + +/* A couple of harmless helper macros */ +#define SEND(X) debug("sending '%s' to squid\n",X); printf(X "\n"); +#ifdef __GNUC__ +#define SEND2(X,Y...) debug("sending '" X "' to squid\n",Y); printf(X "\n",Y); +#else +/* no gcc, no debugging. varargs macros are a gcc extension */ +#define SEND2(X,Y) debug("sending '" X "' to squid\n",Y); printf(X "\n",Y); +#endif + Index: squid/src/helper.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/helper.c,v retrieving revision 1.16.10.6 retrieving revision 1.16.10.7 diff -u -r1.16.10.6 -r1.16.10.7 --- squid/src/helper.c 17 May 2002 17:14:06 -0000 1.16.10.6 +++ squid/src/helper.c 16 Jul 2002 09:33:59 -0000 1.16.10.7 @@ -1,6 +1,6 @@ /* - * $Id: helper.c,v 1.16.10.6 2002/05/17 17:14:06 serassio Exp $ + * $Id: helper.c,v 1.16.10.7 2002/07/16 09:33:59 serassio Exp $ * * DEBUG: section 29 Helper process maintenance * AUTHOR: Harvest Derived? @@ -32,8 +32,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. * */ -#ifndef HELPER_C -#define HELPER_C #include "squid.h" @@ -1206,4 +1204,3 @@ xfree(r->buf); memFree(r, MEM_HELPER_STATEFUL_REQUEST); } -#endif /* HELPER_C */