dnl
dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
dnl
-dnl $Id: configure.in,v 1.204 2000/10/04 00:20:58 wessels Exp $
+dnl $Id: configure.in,v 1.205 2000/10/20 23:50:58 hno Exp $
dnl
dnl
dnl
AC_INIT(src/main.c)
AC_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.204 $)dnl
+AC_REVISION($Revision: 1.205 $)dnl
AC_PREFIX_DEFAULT(/usr/local/squid)
AC_CONFIG_AUX_DIR(cfgaux)
dnl use .exe suffix for executables on cygwin32 platform
case "$host_os" in
-cygwin32|os2)
+cygwin|cygwin32|os2)
exec_suffix=".exe"
cgi_suffix=".exe"
;;
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
-#ifdef __linux__
+#if defined (__linux__) || defined (__CYGWIN__)
#define ip_hl ihl
#endif
#ifndef __linux__
+#ifndef __CYGWIN__
#define iphdr ip
+#endif
#endif],
[struct iphdr ip;
ip.ip_hl= 0;],
FILE *fp;
int i,j;
#if defined(__CYGWIN32__) || defined (__CYGWIN__)
- /*
- * getrlimit and sysconf returns bogous values on cygwin32.
+ /* getrlimit and sysconf returns bogous values on cygwin32.
* Number of fds is virtually unlimited in cygwin (sys/param.h)
- * NOTE: __CYGWIN32__ is deprecated.
+ * __CYGWIN32__ is deprecated.
*/
i = NOFILE;
-#elif HAVE_SETRLIMIT
+#else
+#if HAVE_SETRLIMIT
struct rlimit rl;
#if defined(RLIMIT_NOFILE)
if (getrlimit(RLIMIT_NOFILE, &rl) < 0) {
}
}
i++;
+#endif /* IF !DEF CYGWIN */
fp = fopen("conftestval", "w");
fprintf (fp, "%d\n", i);
exit(0);
/*
- * $Id: rfc1123.c,v 1.24 2000/03/27 21:56:21 wessels Exp $
+ * $Id: rfc1123.c,v 1.25 2000/10/20 23:50:59 hno Exp $
*
* DEBUG:
* AUTHOR: Harvest Derived
#if defined (_TIMEZONE)
#elif defined (_timezone)
#elif defined(_SQUID_AIX_)
+#elif defined(_SQUID_CYGWIN_)
#else
extern time_t timezone;
#endif
*/
if (tm.tm_isdst > 0)
dst = -3600;
-#ifdef _timezone
+#if defined ( _timezone) || defined(_SQUID_CYGWIN_)
t -= (_timezone + dst);
#else
t -= (timezone + dst);
/*
- * $Id: util.c,v 1.72 2000/10/17 08:06:01 adrian Exp $
+ * $Id: util.c,v 1.73 2000/10/20 23:50:59 hno Exp $
*
* DEBUG:
* AUTHOR: Harvest Derived
#if !defined(__CYGWIN__)
extern int sys_nerr;
#else
-extern __declspec(dllimport) int sys_nerr;
+ #define sys_nerr _sys_nerr
#endif
+
#if MEM_GEN_TRACE
static FILE *tracefp = NULL;
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.194 2000/09/01 12:30:24 hno Exp $
+# $Id: Makefile.in,v 1.195 2000/10/20 23:50:59 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
fi
install-pinger:
- @f=pinger; \
+ @f=$(PINGER_EXE); \
if test -f $(libexecdir)/$$f; then \
echo $(MV) $(libexecdir)/$$f $(libexecdir)/-$$f; \
$(MV) $(libexecdir)/$$f $(libexecdir)/-$$f; \
/*
- * $Id: carp.cc,v 1.12 2000/08/01 22:31:16 wessels Exp $
+ * $Id: carp.cc,v 1.13 2000/10/20 23:50:59 hno Exp $
*
* DEBUG: section 39 Cache Array Routing Protocol
* AUTHOR: Eric Stern
peer *
carpSelectParent(request_t * request)
{
-#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> ((sizeof(u_long)*8)-(n))))
+#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (((sizeof(unsigned long)*8)-(n)))))
const char *c;
peer *p = NULL;
peer *tp;
/*
- * $Id: client_side.cc,v 1.507 2000/10/20 23:47:46 hno Exp $
+ * $Id: client_side.cc,v 1.508 2000/10/20 23:50:59 hno Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
* Set the timeout BEFORE calling clientReadRequest().
*/
commSetTimeout(conn->fd, Config.Timeout.pconn, requestTimeout, conn);
+ /*
+ * CYGWIN has a problem and is blocking on read() requests when there
+ * is no data present.
+ * This hack may hit performance a little, but it's better than
+ * blocking!.
+ */
+#ifdef _SQUID_CYGWIN_
+ commSetSelect(conn->fd, COMM_SELECT_READ, clientReadRequest, conn, 0);
+#else
clientReadRequest(conn->fd, conn); /* Read next request */
+#endif
/*
* Note, the FD may be closed at this point.
*/
/*
- * $Id: comm.cc,v 1.310 2000/10/17 08:06:02 adrian Exp $
+ * $Id: comm.cc,v 1.311 2000/10/20 23:51:00 hno Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
{
int flags;
int dummy = 0;
+#ifdef _SQUID_CYGWIN_
+ int nonblocking = TRUE;
+ if(fd_table[fd].type != FD_PIPE) {
+ if(ioctl(fd, FIONBIO, &nonblocking) < 0) {
+ debug(50, 0) ("commSetNonBlocking: FD %d: %s %D\n", fd, xstrerror(), fd_table[fd].type);
+ return COMM_ERROR;
+ }
+ }
+ else {
+#endif
if ((flags = fcntl(fd, F_GETFL, dummy)) < 0) {
debug(50, 0) ("FD %d: fcntl F_GETFL: %s\n", fd, xstrerror());
return COMM_ERROR;
debug(50, 0) ("commSetNonBlocking: FD %d: %s\n", fd, xstrerror());
return COMM_ERROR;
}
+#ifdef _SQUID_CYGWIN_
+ }
+#endif
fd_table[fd].flags.nonblocking = 1;
return 0;
}
/*
- * $Id: disk.cc,v 1.151 2000/10/17 08:06:03 adrian Exp $
+ * $Id: disk.cc,v 1.152 2000/10/20 23:51:00 hno Exp $
*
* DEBUG: section 6 Disk I/O Routines
* AUTHOR: Harvest Derived
static PF diskHandleRead;
static PF diskHandleWrite;
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_OS2_)
+#if defined(_SQUID_MSWIN_) || defined(_SQUID_OS2_) || defined(_SQUID_CYGWIN_)
static int
diskWriteIsComplete(int fd)
{
read_callback(-1, F->read_data);
}
if (F->flags.write_daemon) {
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_OS2_)
+#if defined(_SQUID_MSWIN_) || defined(_SQUID_OS2_) || defined (_SQUID_CYGWIN_)
/*
* on some operating systems, you can not delete or rename
* open files, so we won't allow delayed close.
/*
- * $Id: main.cc,v 1.318 2000/10/17 08:06:03 adrian Exp $
+ * $Id: main.cc,v 1.319 2000/10/20 23:51:00 hno Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Harvest Derived
close(i);
}
#endif
+
+
+/* RBCOLLINS - if cygwin stackdumps when squid is run without -N, check the cygwin1.dll version, it needs to be AT LEAST 1.1.3. execvp had a bit overflow error in a loop..
+*/
/* Connect stdio to /dev/null in daemon mode */
nullfd = open("/dev/null", O_RDWR);
dup2(nullfd, 0);
/*
- * $Id: pinger.cc,v 1.44 2000/05/16 07:06:06 wessels Exp $
+ * $Id: pinger.cc,v 1.45 2000/10/20 23:51:00 hno Exp $
*
* DEBUG: section 42 ICMP Pinger program
* AUTHOR: Duane Wessels
#include <netinet/ip_icmp.h>
#ifndef _SQUID_LINUX_
+#ifndef _SQUID_CYGWIN_
#define icmphdr icmp
#define iphdr ip
#endif
+#endif
-#ifdef _SQUID_LINUX_
+#if defined (_SQUID_LINUX_) || defined (_SQUID_CYGWIN_)
#ifdef icmp_id
#undef icmp_id
#endif