[squid-users] How to compile Squid 3.0 for Windows?

From: fulan Peng <fulanpeng@dont-contact.us>
Date: Fri, 25 Aug 2006 21:10:37 -0400

Hi,
I am looking Squid on Windows with SSL and accelorator. I tried all
2.6 binaries and all of them have an error of "no OPENSSL_Applink
error". I did not try the 2.5 version.
I tried to compile 2.6 and 3.0 all reversions on msys-mingw, and all
of them have a compiling error. The following is the error message
and the C source code.
I have already done the same thing on FreeBSD and Linux without any error.
I do not know why. Thanks.
....
....
if gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include
-I../lib/cppunit-1.10.0/include -I ../lib/cppunit-1.10.0/include
-Ic:/apache2/srclib/openssl/include/include -Werror -Wall
-Wpointer-arith -Wwrite-strings -Wmissing-prototypes
-Wmissing-declarations -Wcomments -Wall -g -O2 -mthreads -MT
getfullhostname.o -MD -MP -MF ".deps/getfullhostname.Tpo" -c -o
getfullhostname.o getfullhostname.c; \
then mv -f ".deps/getfullhostname.Tpo" ".deps/getfullhostname.Po";
else rm -f ".deps/getfullhostname.Tpo"; exit 1; fi
getfullhostname.c: In function `getfullhostname':
getfullhostname.c:86: warning: implicit declaration of function `gethostname'
getfullhostname.c:88: warning: implicit declaration of function `gethostbyname'
getfullhostname.c:88: warning: assignment makes pointer from integer
without a cast
getfullhostname.c:89: error: dereferencing pointer to incomplete type
make[2]: *** [getfullhostname.o] Error 1
make[2]: Leaving directory `/usr/squid-3.0.PRE4-20060825/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/squid-3.0.PRE4-20060825/lib'
make: *** [all-recursive] Error 1

/*
 * $Id: getfullhostname.c,v 1.20 2003/01/23 00:37:01 robertc Exp $
 *
 * DEBUG:
 * AUTHOR: Harvest Derived
 *
 * SQUID Web Proxy Cache http://www.squid-cache.org/
 * ----------------------------------------------------------
 *
 * Squid is the result of efforts by numerous individuals from
 * the Internet community; see the CONTRIBUTORS file for full
 * details. Many organizations have provided support for Squid's
 * development; see the SPONSORS file for full details. Squid is
 * Copyrighted (C) 2001 by the Regents of the University of
 * California; see the COPYRIGHT file for full details. Squid
 * incorporates software developed and/or copyrighted by other
 * sources; see the CREDITS file for full details.
 *
 * 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 of the License, 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., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
 *
 */

#include "config.h"

#if HAVE_LIBC_H
#include <libc.h>
#endif
#if HAVE_STDIO_H
#include <stdio.h>
#endif
#if HAVE_STDLIB_H
#include <stdlib.h>
#endif
#if HAVE_STRING_H
#include <string.h>
#endif
#if HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#if HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#if HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#if HAVE_NETDB_H && !defined(_SQUID_NETDB_H_) /* protect on NEXTSTEP */
#define _SQUID_NETDB_H_
#include <netdb.h>
#endif
#if HAVE_UNISTD_H
#include <unistd.h>
#endif

#include "util.h"

/*
 * getfullhostname() - Returns the fully qualified name of the current
 * host, or NULL on error. Pointer is only valid until the next call
 * to the gethost*() functions.
 */
const char *
getfullhostname(void)
{
    const struct hostent *hp = NULL;
    static char buf[SQUIDHOSTNAMELEN + 1];

    if (gethostname(buf, SQUIDHOSTNAMELEN) < 0)
        return NULL;
        hp = gethostbyname(buf);
    if (hp != NULL)
        xstrncpy(buf, hp->h_name, SQUIDHOSTNAMELEN);
    return buf;
}
Received on Fri Aug 25 2006 - 19:10:43 MDT

This archive was generated by hypermail pre-2.1.9 : Fri Sep 01 2006 - 12:00:02 MDT