> Hi Alex, > > At 18:28 21/01/2008, Alex Rousskov wrote: > >>Please let me know if both of you get stuck with any specific error and >>I will try to help. FWIW, I doubt many Squid functions should be >>declared with C binding so we may just need to modify some old >>declarations to remove "extern C". > > Just this one left: > > depbase=`echo ACLARP.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; \ > if g++ -DHAVE_CONFIG_H > -DDEFAULT_CONFIG_FILE=\"c:/mgw-3.0/etc/squid.conf\" -I. -I. > -I../include -I. -I. -I../include -I../include > -I../lib/libTrie/include -I/usr/include/libxml2 -Werror -Wall > -Wpointer-arith -Wwrite-strings -Wcomments -D_FILE_OFFSET_BITS=64 -g > -O2 -mthreads -MT ACLARP.o -MD -MP -MF "$depbase.Tpo" -c -o ACLARP.o > ACLARP.cc; \ > then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit > 1; fi > ACLARP.cc: In function `int aclMatchArp(SplayNode<acl_arp_data*>**, > IPAddress&)': > ACLARP.cc:571: error: no matching function for call to > `in_addr::in_addr(DWORD&)' > d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winsock2.h:223: > note: candidates are: in_addr::in_addr() > d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winsock2.h:223: > note: in_addr::in_addr(const in_addr&) > make[3]: *** [ACLARP.o] Error 1 > > I'm not able to do the correct type cast, please do you can help me ? >
oh b*%%*r. This might be why the ACLARP originally used raw bytes instead of proper types. Are you able to add a cast it to DWORD->BYTE[4]->in_addr or DWORD->BYTE[4]->int->in_addr or even void* if those fail? I think we need to check the byte-order is not touched. It should be arriving as a network-order DWORD. Amos
