Search squid archive

Re: Problem with running squid 3.5 on windows 7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Amos,
 
I'm continuing trying to make it run on 64 bit windows.
I bumped into the following compilation error:
 
ipc_win32.cc:720:38: error: call of overloaded ‘write(int&, char*&, ssize_t&)’ is ambiguous

x = write(c2p[1], buf1, x);

^

ipc_win32.cc:720:38: note: candidates are:

In file included from /usr/x86_64-w64-mingw32/sys-root/mingw/include/direct.h:10:0,

from ../compat/os/mswindows.h:38,

from ../compat/compat.h:73,

from ../include/squid.h:43,

from ipc_win32.cc:11:

/usr/x86_64-w64-mingw32/sys-root/mingw/include/io.h:329:15: note: int write(int, const void*, unsigned int)

int __cdecl write(int _Filehandle,const void *_Buf,unsigned int _MaxCharCount) __MINGW_ATTRIB_DEPRECATED_MSVC2005;

^

In file included from ../compat/compat.h:73:0,

from ../include/squid.h:43,

from ipc_win32.cc:11:

../compat/os/mswindows.h:486:1: note: int write(int, const void*, size_t)

write(int fd, const void * buf, size_t siz)

^

Makefile:7011: recipe for target 'ipc_win32.o' failed
 
 
I suppose I need to use the second one, right (the first one seems deprecated)? 
As soon as I make it run, I will send you a patch.
 
Thank you!
 
--e
 
> Date: Sun, 21 Dec 2014 16:43:35 +1300
> From: squid3@xxxxxxxxxxxxx
> To: al.akchurin@xxxxxxxxxxx; squid-users@xxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [squid-users] Problem with running squid 3.5 on windows 7
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 21/12/2014 11:58 a.m., Eldar Akchurin wrote:
> > Hi Amos,
> >
> > Hmm, after checking I found out that this fix works only for 64
> > bit. When I try this on 32, both mingw on Cygwin and Ubuntu cannot
> > identify presence of getaddrinfo.
> >
> > It seems the 32 bit version of libws2_32 is compiled with
> > "stdcall", i.e. the following works:
> >
> > #ifdef __cplusplus extern "C" #endif char
> > __attribute__((__stdcall__)) getaddrinfo(int, int, int, int); //
> >
> > // AUTOCONF tries out the below one (which does not mingle @16) //
> > char getaddrinfo(); // return getaddrinfo();
> >
> > int main () { return getaddrinfo(0,0,0,0); ; return 0; }
> >
> > I also found the following report, which kind of confirms what I
> > see (https://patches.libav.org/patch/545/): This moves
> > network_extralibs setup before use so that the link test works
> > correctly on mingw-w64. mingw32 still fails to detect it due to
> > calling convention differences; getaddrinfo() is STDCALL, so it is
> > mangled as getaddrinfo@16 on x86.
> >
> > Unfortunately, my background is windows, so I'm new to autoconf and
> > all unix business. What do you think will be the right approach
> > here? Maybe AC_CECK_DECL instead of AC_REPLACE_FUNC for getaddrinfo
> > (and maybe some other funcs declared in the same lib)?
> >
>
>
> Aha. That explains it, my build VM is an old 32-bit.
>
> AC_CECK_DECL might work. getaddrinfo/getnameinfo/inet_ntop/inet_pton
> are the key ones for IP parsing. If not a full replacement lookup macro.
>
> I am going to be delving into the configure.ac logics to add some new
> definitions for Solaris IP-Filter after the holidays. Might as well
> write a new one for Windows getaddrinfo() while I'm doing that.
>
>
> > Thank you very much for all your help, really appreciate it!
> >
> > --e
>
> No, thank you for yours. I have been procrastinating a bit much on
> this project.
>
> Amos
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.22 (MingW32)
>
> iQEcBAEBAgAGBQJUlkHnAAoJELJo5wb/XPRjYoMH/RmApzGhNDemo6x+MXmVzUsf
> a8M+JY2OFminwNAJ3SNoz7SBmO6Kmi0fvh6f7LeJfmG6utr0M0/lqCFL9MZ8RDUs
> a9COhruK0Mwrs25z0kgzXSaZ6c4qV0mbCEeuUMGTnNKIkSkCflkljt1PMJ3O1+ou
> A+8EKWaMlXLXGOpVSqctwzkJex0B+cDOnaQ1j6cpioW7TZK+OyRGqj+BYB/GmVt4
> sxZX0UmsTmcTgFvKx1TbbUJPHpYy3PdJcIWlKRiMbL3FJQh4VmAc64g96qiOSXYF
> 72N9jQ8NTYVc/Gns0c8vse2kN/BSJk8uSFfvS9FXeFjtCvzjvBEFEQ7TUKhXaxs=
> =Hs2Z
> -----END PGP SIGNATURE-----
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux