<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi Amos,<br> <br>I'm continuing trying to make it run on 64 bit windows.<br>I bumped into the following compilation error:<br> <br><font size="1">ipc_win32.cc:720:38: error: call of overloaded ‘write(int&, char*&, ssize_t&)’ is ambiguous<br><br>             x = write(c2p[1], buf1, x);<br><br>                                      ^<br><br>ipc_win32.cc:720:38: note: candidates are:<br><br>In file included from /usr/x86_64-w64-mingw32/sys-root/mingw/include/direct.h:10:0,<br><br>                 from ../compat/os/mswindows.h:38,<br><br>                 from ../compat/compat.h:73,<br><br>                 from ../include/squid.h:43,<br><br>                 from ipc_win32.cc:11:<br><br>/usr/x86_64-w64-mingw32/sys-root/mingw/include/io.h:329:15: note: int write(int, const void*, unsigned int)<br><br>   int __cdecl write(int _Filehandle,const void *_Buf,unsigned int _MaxCharCount) __MINGW_ATTRIB_DEPRECATED_MSVC2005;<br><br>               ^<br><br>In file included from ../compat/compat.h:73:0,<br><br>                 from ../include/squid.h:43,<br><br>                 from ipc_win32.cc:11:<br><br>../compat/os/mswindows.h:486:1: note: int write(int, const void*, size_t)<br><br><font style="background-color: rgb(255, 255, 0);">write(int fd, const void * buf, size_t siz)</font><br><br> ^<br><br>Makefile:7011: recipe for target 'ipc_win32.o' failed<br></font> <br> <br>I suppose I need to use <font style="background-color: rgb(255, 255, 0);">the second one</font>, right (the first one seems deprecated)? <br>As soon as I make it run, I will send you a patch.<br> <br>Thank you!<br> <br>--e<br> <BR><div>> Date: Sun, 21 Dec 2014 16:43:35 +1300<br>> From: squid3@treenet.co.nz<br>> To: al.akchurin@hotmail.com; squid-users@lists.squid-cache.org<br>> Subject: Re: [squid-users] Problem with running squid 3.5 on windows 7<br>> <br>> -----BEGIN PGP SIGNED MESSAGE-----<br>> Hash: SHA1<br>> <br>> On 21/12/2014 11:58 a.m., Eldar Akchurin wrote:<br>> > Hi Amos,<br>> > <br>> > Hmm, after checking I found out that this fix works only for 64<br>> > bit. When I try this on 32, both mingw on Cygwin and Ubuntu cannot<br>> > identify presence of getaddrinfo.<br>> > <br>> > It seems the 32 bit version of libws2_32 is compiled with<br>> > "stdcall", i.e. the following works:<br>> > <br>> > #ifdef __cplusplus extern "C" #endif char<br>> > __attribute__((__stdcall__)) getaddrinfo(int, int, int, int); //<br>> > <br>> > // AUTOCONF tries out the below one (which does not mingle @16) //<br>> > char getaddrinfo(); // return getaddrinfo();<br>> > <br>> > int main () { return getaddrinfo(0,0,0,0); ; return 0; }<br>> > <br>> > I also found the following report, which kind of confirms what I<br>> > see (https://patches.libav.org/patch/545/): This moves<br>> > network_extralibs setup before use so that the link test works<br>> > correctly on mingw-w64.  mingw32 still fails to detect it due to<br>> > calling convention differences; getaddrinfo() is STDCALL, so it is<br>> > mangled as getaddrinfo@16 on x86.<br>> > <br>> > Unfortunately, my background is windows, so I'm new to autoconf and<br>> > all unix business. What do you think will be the right approach<br>> > here? Maybe AC_CECK_DECL instead of AC_REPLACE_FUNC for getaddrinfo<br>> > (and maybe some other funcs declared in the same lib)?<br>> > <br>> <br>> <br>> Aha. That explains it, my build VM is an old 32-bit.<br>> <br>> AC_CECK_DECL might work. getaddrinfo/getnameinfo/inet_ntop/inet_pton<br>> are the key ones for IP parsing. If not a full replacement lookup macro.<br>> <br>> I am going to be delving into the configure.ac logics to add some new<br>> definitions for Solaris IP-Filter after the holidays. Might as well<br>> write a new one for Windows getaddrinfo() while I'm doing that.<br>> <br>> <br>> > Thank you very much for all your help, really appreciate it!<br>> > <br>> > --e<br>> <br>> No, thank you for yours. I have been procrastinating a bit much on<br>> this project.<br>> <br>> Amos<br>> -----BEGIN PGP SIGNATURE-----<br>> Version: GnuPG v2.0.22 (MingW32)<br>> <br>> iQEcBAEBAgAGBQJUlkHnAAoJELJo5wb/XPRjYoMH/RmApzGhNDemo6x+MXmVzUsf<br>> a8M+JY2OFminwNAJ3SNoz7SBmO6Kmi0fvh6f7LeJfmG6utr0M0/lqCFL9MZ8RDUs<br>> a9COhruK0Mwrs25z0kgzXSaZ6c4qV0mbCEeuUMGTnNKIkSkCflkljt1PMJ3O1+ou<br>> A+8EKWaMlXLXGOpVSqctwzkJex0B+cDOnaQ1j6cpioW7TZK+OyRGqj+BYB/GmVt4<br>> sxZX0UmsTmcTgFvKx1TbbUJPHpYy3PdJcIWlKRiMbL3FJQh4VmAc64g96qiOSXYF<br>> 72N9jQ8NTYVc/Gns0c8vse2kN/BSJk8uSFfvS9FXeFjtCvzjvBEFEQ7TUKhXaxs=<br>> =Hs2Z<br>> -----END PGP SIGNATURE-----<br></div>                                        </div></body>
</html>