--------------------- PatchSet 8927 Date: 2009/05/30 15:46:56 Author: serassio Branch: nt Tag: (none) Log: Fix build failure on MinGW - first chunck Members: configure.in:1.26.2.165->1.26.2.166 compat/osdetect.h:1.1.2.2->1.1.2.3 compat/os/mswin.h:1.1.2.2->1.1.2.3 Index: squid3/configure.in =================================================================== RCS file: /cvsroot/squid-sf//squid3/configure.in,v retrieving revision 1.26.2.165 retrieving revision 1.26.2.166 diff -u -r1.26.2.165 -r1.26.2.166 --- squid3/configure.in 9 May 2009 09:30:23 -0000 1.26.2.165 +++ squid3/configure.in 30 May 2009 15:46:56 -0000 1.26.2.166 @@ -1,6 +1,6 @@ dnl Configuration input file for Squid dnl -dnl $Id: configure.in,v 1.26.2.165 2009/05/09 09:30:23 serassio Exp $ +dnl $Id: configure.in,v 1.26.2.166 2009/05/30 15:46:56 serassio Exp $ dnl dnl dnl @@ -10,7 +10,7 @@ AC_CONFIG_AUX_DIR(cfgaux) AC_CONFIG_SRCDIR([src/main.cc]) AM_INIT_AUTOMAKE([tar-ustar nostdinc]) -AC_REVISION($Revision: 1.26.2.165 $)dnl +AC_REVISION($Revision: 1.26.2.166 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AM_MAINTAINER_MODE @@ -2626,17 +2626,12 @@ save_LIBS="$LIBS" for curlib in ws2_32 wsock32; do LIBS="$LIBS -l$curlib" - AC_TRY_LINK([ - char __attribute__((stdcall)) socket(int,int,int); - char __attribute__((stdcall)) select(int,int,int,int,int); - char __attribute__((stdcall)) closesocket(int); - char __attribute__((stdcall)) gethostname(int,int); - ], + AC_TRY_LINK([#include ], [ - socket(1,2,3); - select(1,2,3,4,5); - closesocket(1); - gethostname(1,2); + socket(0,0,0); + select(0,NULL,NULL,NULL,NULL); + closesocket(0); + gethostname(NULL,0); ], have_winsock=yes, have_winsock=no) Index: squid3/compat/osdetect.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/compat/osdetect.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- squid3/compat/osdetect.h 4 Mar 2009 13:48:58 -0000 1.1.2.2 +++ squid3/compat/osdetect.h 30 May 2009 15:46:56 -0000 1.1.2.3 @@ -65,7 +65,7 @@ #define _SQUID_WIN32_ #elif defined(WIN32) || defined(WINNT) || defined(__WIN32__) || defined(__WIN32) -#define _SQUID_MSWIN_ +#define _SQUID_MSWIN_ 1 #define _SQUID_WIN32_ #elif defined(__APPLE__) Index: squid3/compat/os/mswin.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/compat/os/mswin.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- squid3/compat/os/mswin.h 4 Mar 2009 13:48:59 -0000 1.1.2.2 +++ squid3/compat/os/mswin.h 30 May 2009 15:46:56 -0000 1.1.2.3 @@ -1,5 +1,5 @@ /* - * $Id: mswin.h,v 1.1.2.2 2009/03/04 13:48:59 serassio Exp $ + * $Id: mswin.h,v 1.1.2.3 2009/05/30 15:46:56 serassio Exp $ * * AUTHOR: Andrey Shorin * AUTHOR: Guido Serassio @@ -720,49 +720,5 @@ #undef ACL - -/** \cond AUTODOCS-IGNORE */ -using namespace Squid; -/** \endcond */ - - -/* win32lib.c */ -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); -SQUIDCEXTERN const char * wsastrerror(int); -SQUIDCEXTERN struct passwd *getpwnam(char *); -SQUIDCEXTERN struct group *getgrnam(char *); -SQUIDCEXTERN uid_t geteuid(void); -SQUIDCEXTERN uid_t getuid(void); -SQUIDCEXTERN int setuid(uid_t); -SQUIDCEXTERN int seteuid(uid_t); -SQUIDCEXTERN gid_t getgid(void); -SQUIDCEXTERN gid_t getegid(void); -SQUIDCEXTERN int setgid(gid_t); -SQUIDCEXTERN int setegid(gid_t); -SQUIDCEXTERN const char *WIN32_strerror(int); -SQUIDCEXTERN void WIN32_maperror(unsigned long); - -// Moved in from squid.h and other duplicates. -// BUT was already included up the top there with a wrapped conditional. -// that may need checking.... -//#include - -/* Windows may lack getpagesize() prototype */ -// Moved in from squid.h -// NP: there may be a header include needed before this to prevent duplicate-definitions -// if that is true it will need including here as part of the hack. -// if not then this comment can be dropped. -#if !defined(getpagesize) -SQUIDCEXTERN size_t getpagesize(void); -#endif - - #endif /* _SQUID_WIN32_ */ #endif /* SQUID_OS_MSWIN_H */