[squid-dev] Bug fixes for mingw based on squid-3.5.0.4-20150106-r13714
Dennis
dennis at infologika.com.br
Mon Jan 12 19:09:42 UTC 2015
Dear Sirs
I tried compiling squid-3.5.0.4-20150106-r13714 running under windows
with wingw
It still had a few bugs. I fixed them and now it compiles and runs, but
still can't resolve addresses (I have correctly specified the name servers).
I get:
WARNING: Reply from unknown nameserver [::]:53
I don't have more time to work it further.
I would like to contribute with the fixes I wrote. Here are them.
Obs.: the diff shows squid-3.5.0.4 against
squid-3.5.0.4-20150106-r13714, but it is actually my
squid-3.5.0.4-20150106-r13714 against squid-3.5.0.4-20150106-r13714
configure command used:
./configure --enable-default-hostsfile=none --prefix=C:/msys/1.0/squid
mingw version: latest 32 bit.
diffs:
diff -r C:\msys\1.0\var\squid-3.5.0.4\compat\os\mswindows.h
C:\msys\1.0\var\squid-3.5.0.4-20150106-r13714\compat\os\mswindows.h
625,630c624,629
< /* commen out this function
< inline char *
< inet_ntop(int af, const void *src, char *dst, size_t size)
< {
< return (char*)InetNtopA(af, const_cast<void*>(src), dst, size);
< }
< #define inet_ntop(a,s,d,l) Squid::inet_ntop(a,s,d,l) */
---
> inline char *
> inet_ntop(int af, const void *src, char *dst, size_t size)
> {
> return (char*)InetNtopA(af, const_cast<void*>(src), dst, size);
> }
> #define inet_ntop(a,s,d,l) Squid::inet_ntop(a,s,d,l)
***************************
diff -r C:\msys\1.0\var\squid-3.5.0.4\helpers\basic_auth\SSPI\valid.h
C:\msys\1.0\var\squid-3.5.0.4-20150106-r13714\helpers\basic_auth\SSPI\valid.h
41d40
< typedef HANDLE SERVICE_STATUS_HANDLE;
74c73
< static const char *__foo;
---
> static char *__foo;
95d93
< int Valid_User(char *,char *, char *);
****************************
diff -r
C:\msys\1.0\var\squid-3.5.0.4\helpers\external_acl\LM_group\ext_lm_group_acl.ccC:\msys\1.0\var\squid-3.5.0.4-20150106-r13714\helpers\external_acl\LM_group\ext_lm_group_acl.cc
95d94
< typedef HANDLE SERVICE_STATUS_HANDLE;
**************************************
diff -r
C:\msys\1.0\var\squid-3.5.0.4\helpers\ntlm_auth\SSPI\ntlm_sspi_auth.cc
C:\msys\1.0\var\squid-3.5.0.4-20150106-r13714\helpers\ntlm_auth\SSPI\ntlm_sspi_auth.cc
82d81
< typedef HANDLE SERVICE_STATUS_HANDLE;
*********************
squid-3.5.0.4-20150106-r13714
diff getaddrinfo.cc
26d25
< #include "../src/debug.h"
85c84
< ret = (addrinfo*) malloc (sizeof (struct addrinfo));
---
> ret = malloc (sizeof (struct addrinfo));
89c88
< ret->ai_addr = (sockaddr*) malloc (addrlen);
---
> ret->ai_addr = malloc (addrlen);
180c179
< if (inet_pton(result.ai_family, nodename, &sin.sin_addr) != 1)
---
> if (inet_pton(result.ai_family, nodename, &sin.sin_addr))
281c280
< sai->ai_canonname = (char *) malloc (strlen (hp->h_name) + 1);
---
> sai->ai_canonname = malloc (strlen (hp->h_name) + 1);
*****************
diff -r C:\msys\1.0\var\squid-3.5.0.4\compat\getnameinfo.cc
C:\msys\1.0\var\squid-3.5.0.4-20150106-r13714\compat\getnameinfo.cc
151c151,159
< int xgetnameinfo(const struct sockaddr *sa, socklen_t salen, char
*host, size_t hostlen, char *serv, size_t servlen, int flags)
---
> int
> xgetnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
> const struct sockaddr *sa;
> socklen_t salen;
> char *host;
> size_t hostlen;
> char *serv;
> size_t servlen;
> int flags;
******************
diff -r C:\msys\1.0\var\squid-3.5.0.4\compat\inet_ntop.cc
C:\msys\1.0\var\squid-3.5.0.4-20150106-r13714\compat\inet_ntop.cc
97,98c97,98
< const char *inet_ntop4 (const u_char *src, char *dst, size_t size);
< const char *inet_ntop6 (const u_char *src, char *dst, size_t size);
---
> static const char *inet_ntop4 (const u_char *src, char *dst, size_t
size);
> static const char *inet_ntop6 (const u_char *src, char *dst, size_t
size);
107,112c108,113
< const char *
< xinet_ntop(af, src, dst, size)
< int af;
< const void *src;
< char *dst;
< size_t size;
---
> const char *
> xinet_ntop(af, src, dst, size)
> int af;
> const void *src;
> char *dst;
> size_t size;
114d113
< const char * xinet_ntop(int af, const void *src, char * dst, size_t size)
118c117
< return (inet_ntop4((const u_char*) src, dst, size));
---
> return (inet_ntop4(src, dst, size));
120c119
< return (inet_ntop6((const u_char*) src, dst, size));
---
> return (inet_ntop6(src, dst, size));
138,142c138,142
< static const char *
< inet_ntop4(src, dst, size)
< const u_char *src;
< char *dst;
< size_t size;
---
> static const char *
> inet_ntop4(src, dst, size)
> const u_char *src;
> char *dst;
> size_t size;
144d142
< const char * inet_ntop4( const u_char *src, char *dst, size_t size)
149c147
< if ((size_t) snprintf(tmp, min(sizeof("255.255.255.255"),size),
fmt, src[0], src[1], src[2], src[3]) >= size) {
---
> if (snprintf(tmp, min(sizeof("255.255.255.255"),size), fmt,
src[0], src[1], src[2], src[3]) >= size) {
162,166c161,165
< static const char *
< inet_ntop6(src, dst, size)
< const u_char *src;
< char *dst;
< size_t size;
---
> static const char *
> inet_ntop6(src, dst, size)
> const u_char *src;
> char *dst;
> size_t size;
168d165
< const char * inet_ntop6( const u_char *src, char *dst, size_t size)
***************
diff -r C:\msys\1.0\var\squid-3.5.0.4\compat\inet_pton.cc
C:\msys\1.0\var\squid-3.5.0.4-20150106-r13714\compat\inet_pton.cc
106c106,110
< int xinet_pton( int af, const char *src, void *dst)
---
> int
> xinet_pton(af, src, dst)
> int af;
> const char *src;
> void *dst;
110c114
< return (inet_pton4(src, (u_char*) dst));
---
> return (inet_pton4(src, dst));
112c116
< return (inet_pton6(src, (u_char*) dst));
---
> return (inet_pton6(src, dst));
130c134,137
< static int inet_pton4( const char *src, u_char *dst)
---
> static int
> inet_pton4(src, dst)
> const char *src;
> u_char *dst;
144c150
< u_int nw = *tp * 10 + (pch - digits);
---
> u_int new = *tp * 10 + (pch - digits);
148c154
< if (nw > 255)
---
> if (new > 255)
150c156
< *tp = nw;
---
> *tp = new;
162c168
< break; //return (0);
---
> return (0);
183c189,192
< static int inet_pton6( const char *src, u_char *dst)
---
> static int
> inet_pton6(src, dst)
> const char *src;
> u_char *dst;
238c247
< break; //return (0);
---
> return (0);
***********************
diff -r C:\msys\1.0\var\squid-3.5.0.4\src\comm\ModSelectWin32.cc
C:\msys\1.0\var\squid-3.5.0.4-20150106-r13714\src\comm\ModSelectWin32.cc
20d19
< #include "SquidConfig.h"
25d23
< #include "Globals.h"
278c276
< incoming_udp_interval += Config.comm_incoming.udp.average - nevents;
---
> incoming_udp_interval += Config.comm_incoming.udp_average - nevents;
310c308
< incoming_tcp_interval += Config.comm_incoming.tcp.average - nevents;
---
> incoming_tcp_interval += Config.comm_incoming.tcp_average - nevents;
338,339c336
< int calldns = 0;
< int calludp = 0, calltcp = 0;
---
> int calldns = 0, callicp = 0, callhttp = 0;
*************************
diff -r C:\msys\1.0\var\squid-3.5.0.4\src\ipc_win32.cc
C:\msys\1.0\var\squid-3.5.0.4-20150106-r13714\src\ipc_win32.cc
28,41d27
< #else
< #if HAVE_WINSOCK2_H
< #define SO_CONNDATA 0x7000
< #define SO_CONNOPT 0x7001
< #define SO_DISCDATA 0x7002
< #define SO_DISCOPT 0x7003
< #define SO_CONNDATALEN 0x7004
< #define SO_CONNOPTLEN 0x7005
< #define SO_DISCDATALEN 0x7006
< #define SO_DISCOPTLEN 0x7007
< #define SO_OPENTYPE 0x7008
< #define SO_SYNCHRONOUS_ALERT 0x10
< #define SO_SYNCHRONOUS_NONALERT 0x20
< #endif
Thank you for providing squid to us all
Best Regards,
Dennis Felippa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20150112/08e8385e/attachment.html>
More information about the squid-dev
mailing list