Re: Opinion on some open bugs

From: Serassio Guido <guido.serassio@dont-contact.us>
Date: Tue, 12 Jul 2005 21:13:28 +0200

Hi Henrik,

At 01.45 12/07/2005, Henrik Nordstrom wrote:

>On Mon, 11 Jul 2005, Serassio Guido wrote:
>
>>Just installed now, and problem is still here ... :-(
>>
>>I like to know what happens on Solaris 10, where ipfilter is bundled into.
>
>Probably the same thing.
>
>the fault is imho at Squid, not Solaris/IP-Filter. The trouble
>is/was caused by the following:
>
>#define free +
>
>etc in squid.h to block misuse of standard malloc routines where the
>Squid versions should be used. This pollutes the C/C++ token
>namespace crashing any structures or classes having members of the same names.

The problem is clear.
But what about a simple workaround like the following patch ?

Index: src/client_side.c
===================================================================
RCS file: /squid/squid/src/client_side.c,v
retrieving revision 1.561.2.80
diff -u -p -r1.561.2.80 client_side.c
--- src/client_side.c 30 Jun 2005 08:38:00 -0000 1.561.2.80
+++ src/client_side.c 12 Jul 2005 19:07:57 -0000
@@ -46,6 +46,11 @@
  #elif HAVE_NETINET_IP_FIL_COMPAT_H
  #include <netinet/ip_fil_compat.h>
  #elif HAVE_IP_COMPAT_H
+#ifdef _SQUID_SOLARIS_
+#define SOLARIS 1
+#undef free
+#undef sync
+#endif
  #include <ip_compat.h>
  #elif HAVE_NETINET_IP_COMPAT_H
  #include <netinet/ip_compat.h>

With this patch, Squid 2.5 builds fine with both ARP and ipfilter.

Please note the SOLARIS define: it seems that includes from ipfilter
4.1.8 have problems to detect correctly my machine. This fixes the things.

Regards

Guido

-
========================================================
Guido Serassio
Acme Consulting S.r.l. - Microsoft Certified Partner
Via Lucia Savarino, 1 10098 - Rivoli (TO) - ITALY
Tel. : +39.011.9530135 Fax. : +39.011.9781115
Email: guido.serassio@acmeconsulting.it
WWW: http://www.acmeconsulting.it/
Received on Tue Jul 12 2005 - 13:13:47 MDT

This archive was generated by hypermail pre-2.1.9 : Mon Aug 01 2005 - 12:00:04 MDT