--------------------- PatchSet 4478 Date: 2002/07/14 21:07:29 Author: serassio Branch: nt-2_5 Tag: (none) Log: WIN32 source cleanup Members: lib/win32lib.c:1.1.32.4->1.1.32.5 port/win32/include/READDIR.H:1.1.2.1->1.1.2.2 port/win32/include/crypt.h:1.1.2.1->1.1.2.2 port/win32/include/getopt.h:1.1.2.1->1.1.2.2 port/win32/include/squid-mswin.h:1.1.2.10->1.1.2.11 port/win32/squid/buildver.h:1.1.2.4->1.1.2.5 Index: squid/lib/win32lib.c =================================================================== RCS file: /cvsroot/squid-sf//squid/lib/win32lib.c,v retrieving revision 1.1.32.4 retrieving revision 1.1.32.5 diff -u -r1.1.32.4 -r1.1.32.5 --- squid/lib/win32lib.c 26 Apr 2002 20:31:42 -0000 1.1.32.4 +++ squid/lib/win32lib.c 14 Jul 2002 21:08:52 -0000 1.1.32.5 @@ -1,5 +1,5 @@ /* - * $Id: win32lib.c,v 1.1.32.4 2002/04/26 20:31:42 serassio Exp $ + * $Id: win32lib.c,v 1.1.32.5 2002/07/14 21:08:52 serassio Exp $ * * * * * * * * * Legal stuff * * * * * * * * @@ -60,8 +60,6 @@ int opterr = 1; int optopt; - - uid_t geteuid(void) { return 100; Index: squid/port/win32/include/READDIR.H =================================================================== RCS file: /cvsroot/squid-sf//squid/port/win32/include/Attic/READDIR.H,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- squid/port/win32/include/READDIR.H 16 Mar 2002 17:54:33 -0000 1.1.2.1 +++ squid/port/win32/include/READDIR.H 14 Jul 2002 21:07:29 -0000 1.1.2.2 @@ -1,34 +1,33 @@ -/* - * Structures and types used to implement opendir/readdir/closedir - * on Windows 95/NT. -*/ - -#include -//#include -#include -#include -#define off_t _off_t - - -/* struct dirent - same as Unix */ -struct dirent { - long d_ino; /* inode (always 1 in WIN32) */ - off_t d_off; /* offset to this dirent */ - unsigned short d_reclen; /* length of d_name */ - char d_name[_MAX_FNAME+1]; /* filename (null terminated) */ -}; - -/* typedef DIR - not the same as Unix */ -typedef struct { - long handle; /* _findfirst/_findnext handle */ - short offset; /* offset into directory */ - short finished; /* 1 if there are not more files */ - struct _finddata_t fileinfo; /* from _findfirst/_findnext */ - char *dir; /* the dir we are reading */ - struct dirent dent; /* the dirent to return */ -} DIR; - -/* Function prototypes */ -DIR * opendir(const char *); -struct dirent * readdir(DIR *); -int closedir(DIR *); +/* + * Structures and types used to implement opendir/readdir/closedir + * on Windows 95/NT. +*/ + +#include +#include +#include +#define off_t _off_t + + +/* struct dirent - same as Unix */ +struct dirent { + long d_ino; /* inode (always 1 in WIN32) */ + off_t d_off; /* offset to this dirent */ + unsigned short d_reclen; /* length of d_name */ + char d_name[_MAX_FNAME+1]; /* filename (null terminated) */ +}; + +/* typedef DIR - not the same as Unix */ +typedef struct { + long handle; /* _findfirst/_findnext handle */ + short offset; /* offset into directory */ + short finished; /* 1 if there are not more files */ + struct _finddata_t fileinfo; /* from _findfirst/_findnext */ + char *dir; /* the dir we are reading */ + struct dirent dent; /* the dirent to return */ +} DIR; + +/* Function prototypes */ +DIR * opendir(const char *); +struct dirent * readdir(DIR *); +int closedir(DIR *); Index: squid/port/win32/include/crypt.h =================================================================== RCS file: /cvsroot/squid-sf//squid/port/win32/include/Attic/crypt.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- squid/port/win32/include/crypt.h 16 Mar 2002 17:54:33 -0000 1.1.2.1 +++ squid/port/win32/include/crypt.h 14 Jul 2002 21:07:29 -0000 1.1.2.2 @@ -1,45 +1,45 @@ -/* encrypt.h - API to 56 bit DES encryption via calls - encrypt(3), setkey(3) and crypt(3) - Copyright (C) 1991 Jochen Obalek - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#ifndef _ENCRYPT_H_ -#define _ENCRYPT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - - -#ifdef WIN32 -void encrypt(char *block, int edflag); -void setkey(char *key); -char * crypt(const char *key, const char *salt); - -#else -#include <_ansi.h> - -void _EXFUN(encrypt, (char *block, int edflag)); -void _EXFUN(setkey, (char *key)); -char * _EXFUN(crypt, (const char *key, const char *salt)); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _ENCRYPT_H_ */ +/* encrypt.h - API to 56 bit DES encryption via calls + encrypt(3), setkey(3) and crypt(3) + Copyright (C) 1991 Jochen Obalek + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#ifndef _ENCRYPT_H_ +#define _ENCRYPT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#ifdef WIN32 +void encrypt(char *block, int edflag); +void setkey(char *key); +char * crypt(const char *key, const char *salt); + +#else +#include <_ansi.h> + +void _EXFUN(encrypt, (char *block, int edflag)); +void _EXFUN(setkey, (char *key)); +char * _EXFUN(crypt, (const char *key, const char *salt)); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _ENCRYPT_H_ */ Index: squid/port/win32/include/getopt.h =================================================================== RCS file: /cvsroot/squid-sf//squid/port/win32/include/Attic/getopt.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- squid/port/win32/include/getopt.h 16 Mar 2002 17:54:33 -0000 1.1.2.1 +++ squid/port/win32/include/getopt.h 14 Jul 2002 21:07:29 -0000 1.1.2.2 @@ -1,73 +1,73 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2000 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * Portions of this software are based upon public domain software - * originally written at the National Center for Supercomputing Applications, - * University of Illinois, Urbana-Champaign. - */ - -#ifndef GETOPT_H -#define GETOPT_H - -#ifdef WIN32 - -extern char *optarg; -extern int optreset; -extern int optind; -extern int opterr; -extern int optopt; -int getopt(int argc, char* const *argv, const char *optstr); - -#endif /* WIN32 */ - +/* ==================================================================== + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2000 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Apache" and "Apache Software Foundation" must + * not be used to endorse or promote products derived from this + * software without prior written permission. For written + * permission, please contact apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", + * nor may "Apache" appear in their name, without prior written + * permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + * Portions of this software are based upon public domain software + * originally written at the National Center for Supercomputing Applications, + * University of Illinois, Urbana-Champaign. + */ + +#ifndef GETOPT_H +#define GETOPT_H + +#ifdef WIN32 + +extern char *optarg; +extern int optreset; +extern int optind; +extern int opterr; +extern int optopt; +int getopt(int argc, char* const *argv, const char *optstr); + +#endif /* WIN32 */ + #endif /* GETOPT_H */ \ No newline at end of file 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.10 retrieving revision 1.1.2.11 diff -u -r1.1.2.10 -r1.1.2.11 --- squid/port/win32/include/squid-mswin.h 2 Jun 2002 19:26:57 -0000 1.1.2.10 +++ squid/port/win32/include/squid-mswin.h 14 Jul 2002 21:07:29 -0000 1.1.2.11 @@ -1,5 +1,5 @@ /* - * $Id: squid-mswin.h,v 1.1.2.10 2002/06/02 19:26:57 serassio Exp $ + * $Id: squid-mswin.h,v 1.1.2.11 2002/07/14 21:07:29 serassio Exp $ * * AUTHOR: Guido Serassio & Andrey Shorin * @@ -40,6 +40,7 @@ #pragma include_alias(, ) #define alloca _alloca +#define bzero(ptr,size) memset(ptr, 0, size) #define chdir _chdir #define dup _dup #define dup2 _dup2 @@ -57,6 +58,8 @@ #define mkdir(p,m) _mkdir(p) #define mktemp _mktemp #define open _open +#define pclose _pclose +#define popen _popen #define putenv _putenv #define setmode _setmode #define sleep(t) Sleep((t)*1000) Index: squid/port/win32/squid/buildver.h =================================================================== RCS file: /cvsroot/squid-sf//squid/port/win32/squid/Attic/buildver.h,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -r1.1.2.4 -r1.1.2.5 --- squid/port/win32/squid/buildver.h 7 Jul 2002 19:51:18 -0000 1.1.2.4 +++ squid/port/win32/squid/buildver.h 14 Jul 2002 21:07:29 -0000 1.1.2.5 @@ -1,4 +1,4 @@ -#define FILEVER 2,5,8,40 -#define PRODUCTVER 2,5,8,40 -#define STRFILEVER "2, 5, 8, 40\0" -#define STRPRODUCTVER "2, 5, 8, 40\0" +#define FILEVER 2,5,8,56 +#define PRODUCTVER 2,5,8,56 +#define STRFILEVER "2, 5, 8, 56\0" +#define STRPRODUCTVER "2, 5, 8, 56\0"