From: serassio <> Date: Sun, 24 Dec 2006 21:19:27 +0000 (+0000) Subject: Windows port: Fix build errors when using latest MinGW environment X-Git-Tag: SQUID_3_0_PRE6~168 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=379d57519bcad768c34462e1fededc69f148b984;p=thirdparty%2Fsquid.git Windows port: Fix build errors when using latest MinGW environment --- diff --git a/configure.in b/configure.in index e84e4f4d41..fde8a8e124 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ dnl Configuration input file for Squid dnl -dnl $Id: configure.in,v 1.446 2006/12/24 14:12:24 serassio Exp $ +dnl $Id: configure.in,v 1.447 2006/12/24 14:19:27 serassio Exp $ dnl dnl dnl @@ -11,7 +11,7 @@ AM_CONFIG_HEADER(include/autoconf.h) AC_CONFIG_AUX_DIR(cfgaux) AC_CONFIG_SRCDIR([src/main.cc]) AM_INIT_AUTOMAKE([tar-ustar]) -AC_REVISION($Revision: 1.446 $)dnl +AC_REVISION($Revision: 1.447 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AM_MAINTAINER_MODE @@ -2580,6 +2580,7 @@ AC_CHECK_FUNCS(\ getrlimit \ getrusage \ getspnam \ + gettimeofday \ htobe16 \ htole16 \ lrand48 \ diff --git a/include/squid_mswin.h b/include/squid_mswin.h index 46cb15c84d..6fffc31b35 100755 --- a/include/squid_mswin.h +++ b/include/squid_mswin.h @@ -1,5 +1,5 @@ /* - * $Id: squid_mswin.h,v 1.2 2006/09/09 15:29:59 serassio Exp $ + * $Id: squid_mswin.h,v 1.3 2006/12/24 14:19:28 serassio Exp $ * * AUTHOR: Andrey Shorin * AUTHOR: Guido Serassio @@ -195,11 +195,13 @@ struct statfs { long f_spare[6]; /* spare for later */ }; +#ifndef HAVE_GETTIMEOFDAY struct timezone { int tz_minuteswest; /* minutes west of Greenwich */ int tz_dsttime; /* type of dst correction */ }; +#endif #define CHANGE_FD_SETSIZE 1 #if CHANGE_FD_SETSIZE && SQUID_MAXFD > DEFAULT_FD_SETSIZE @@ -728,7 +730,9 @@ struct rusage { SQUIDCEXTERN int chroot (const char *); SQUIDCEXTERN int ftruncate(int, off_t); +#ifndef HAVE_GETTIMEOFDAY SQUIDCEXTERN int gettimeofday(struct timeval * ,void *); +#endif SQUIDCEXTERN int kill(pid_t, int); SQUIDCEXTERN int statfs(const char *, struct statfs *); SQUIDCEXTERN int truncate(const char *, off_t); diff --git a/lib/win32lib.c b/lib/win32lib.c index a8b2130560..b2b8f972b8 100755 --- a/lib/win32lib.c +++ b/lib/win32lib.c @@ -1,6 +1,6 @@ /* - * $Id: win32lib.c,v 1.2 2006/09/09 15:29:59 serassio Exp $ + * $Id: win32lib.c,v 1.3 2006/12/24 14:19:28 serassio Exp $ * * Windows support * AUTHOR: Guido Serassio @@ -176,6 +176,7 @@ kill(pid_t pid, int sig) return 0; } +#ifndef HAVE_GETTIMEOFDAY int gettimeofday(struct timeval *pcur_time, void *tzp) { @@ -192,6 +193,7 @@ gettimeofday(struct timeval *pcur_time, void *tzp) } return 0; } +#endif int statfs(const char *path, struct statfs *sfs)