]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Windows port: Fix build errors when using latest MinGW environment
authorserassio <>
Sun, 24 Dec 2006 21:19:27 +0000 (21:19 +0000)
committerserassio <>
Sun, 24 Dec 2006 21:19:27 +0000 (21:19 +0000)
configure.in
include/squid_mswin.h
lib/win32lib.c

index e84e4f4d41aa118710582af3cbf7fa23c214faff..fde8a8e124c11425e9102e743ae5ba7d82762640 100644 (file)
@@ -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 \
index 46cb15c84d38ba400e0f8bdc8d55cd74388a6cce..6fffc31b35c873ad57e4288b40594d505f85503d 100755 (executable)
@@ -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 <tolsty@tushino.com>
  * AUTHOR: Guido Serassio <serassio@squid-cache.org>
@@ -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);
index a8b21305605edbb26e45cb032d49e07b476bc030..b2b8f972b8da6bada94d25f3783e823c4178aca0 100755 (executable)
@@ -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 <serassio@squid-cache.org>
@@ -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)