bug id:944

From: jorge huang <huang@dont-contact.us>
Date: Mon, 22 Nov 2004 19:50:55 +1100

been running for months, hope you find it useful,
compiles & runs on openbsd-3.6
haven't checked too much if breaks anything

cheers

Index: include/MemPool.h
===================================================================
RCS file: /squid/squid3/include/MemPool.h,v
retrieving revision 1.10
diff -u -r1.10 MemPool.h
--- include/MemPool.h 30 Aug 2004 05:12:29 -0000 1.10
+++ include/MemPool.h 22 Nov 2004 08:18:10 -0000
@@ -10,7 +10,7 @@
 
 #if HAVE_GNUMALLOC_H
 #include <gnumalloc.h>
-#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_)
+#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_) && !defined(__OpenBSD__)
 #include <malloc.h>
 #endif
 
Index: lib/Profiler.c
===================================================================
RCS file: /squid/squid3/lib/Profiler.c,v
retrieving revision 1.3
diff -u -r1.3 Profiler.c
--- lib/Profiler.c 3 Feb 2003 21:33:14 -0000 1.3
+++ lib/Profiler.c 22 Nov 2004 08:18:11 -0000
@@ -112,7 +112,8 @@
 
 #if HAVE_GNUMALLLOC_H
 #include <gnumalloc.h>
-#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_)
+#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_) && !d
+efined(__OpenBSD__)
 #include <malloc.h>
 #endif
 #if HAVE_UNISTD_H
Index: lib/hash.c
===================================================================
RCS file: /squid/squid3/lib/hash.c,v
retrieving revision 1.15
diff -u -r1.15 hash.c
--- lib/hash.c 23 Jan 2003 00:37:01 -0000 1.15
+++ lib/hash.c 22 Nov 2004 08:18:11 -0000
@@ -49,7 +49,7 @@
 #endif
 #if HAVE_GNUMALLLOC_H
 #include <gnumalloc.h>
-#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_)
+#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_) && !defined(__OpenBSD__)
 #include <malloc.h>
 #endif
 #if HAVE_ASSERT_H
Index: lib/ntlmauth.c
===================================================================
RCS file: /squid/squid3/lib/ntlmauth.c,v
retrieving revision 1.9
diff -u -r1.9 ntlmauth.c
--- lib/ntlmauth.c 5 Aug 2003 21:40:09 -0000 1.9
+++ lib/ntlmauth.c 22 Nov 2004 08:18:11 -0000
@@ -81,8 +81,10 @@
 
     lstring_zero(rv);
 
- l = le16toh(str->len);
- o = le32toh(str->offset);
+//JLH l = le16toh(str->len);
+ l = letoh16(str->len);
+//JLH o = le32toh(str->offset);
+ o = letoh32(str->offset);
     /* debug("fetch_string(plength=%d,l=%d,o=%d)\n",length,l,o); */
 
     if (l < 0 || l > MAX_FIELD_LENGTH || o + l > length || o == 0) {
Index: lib/radix.c
===================================================================
RCS file: /squid/squid3/lib/radix.c,v
retrieving revision 1.20
diff -u -r1.20 radix.c
--- lib/radix.c 19 Jun 2003 13:12:00 -0000 1.20
+++ lib/radix.c 22 Nov 2004 08:18:12 -0000
@@ -96,7 +96,7 @@
 #endif
 #if HAVE_GNUMALLOC_H
 #include <gnumalloc.h>
-#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_)
+#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_) && !defined(__OpenBSD__)
 #include <malloc.h>
 #endif
 #if HAVE_MEMORY_H
Index: lib/util.c
===================================================================
RCS file: /squid/squid3/lib/util.c,v
retrieving revision 1.90
diff -u -r1.90 util.c
--- lib/util.c 2 Mar 2003 22:20:31 -0000 1.90
+++ lib/util.c 22 Nov 2004 08:18:13 -0000
@@ -55,7 +55,7 @@
 #endif
 #if HAVE_GNUMALLLOC_H
 #include <gnumalloc.h>
-#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_)
+#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_) && !defined(__OpenBSD__)
 #include <malloc.h>
 #endif
 #if HAVE_ERRNO_H
Index: snmplib/asn1.c
===================================================================
RCS file: /squid/squid3/snmplib/asn1.c,v
retrieving revision 1.10
diff -u -r1.10 asn1.c
--- snmplib/asn1.c 4 Apr 1998 01:43:52 -0000 1.10
+++ snmplib/asn1.c 22 Nov 2004 08:18:16 -0000
@@ -49,7 +49,7 @@
 #endif
 #if HAVE_GNUMALLOC_H
 #include <gnumalloc.h>
-#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_)
+#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_) && !defined(__OpenBSD__)
 #include <malloc.h>
 #endif
 #if HAVE_MEMORY_H
Index: snmplib/coexistance.c
===================================================================
RCS file: /squid/squid3/snmplib/coexistance.c,v
retrieving revision 1.6
diff -u -r1.6 coexistance.c
--- snmplib/coexistance.c 13 Feb 2002 02:40:33 -0000 1.6
+++ snmplib/coexistance.c 22 Nov 2004 08:18:16 -0000
@@ -47,7 +47,7 @@
 #endif
 #if HAVE_GNUMALLOC_H
 #include <gnumalloc.h>
-#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_)
+#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_) && !defined(__OpenBSD__)
 #include <malloc.h>
 #endif
 #if HAVE_MEMORY_H
Index: snmplib/mib.c
===================================================================
RCS file: /squid/squid3/snmplib/mib.c,v
retrieving revision 1.23
diff -u -r1.23 mib.c
--- snmplib/mib.c 7 Nov 2004 13:55:20 -0000 1.23
+++ snmplib/mib.c 22 Nov 2004 08:18:16 -0000
@@ -39,7 +39,7 @@
 #endif
 #if HAVE_GNUMALLOC_H
 #include <gnumalloc.h>
-#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_)
+#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_) && !defined(__OpenBSD__)
 #include <malloc.h>
 #endif
 #if HAVE_MEMORY_H
Index: snmplib/parse.c
===================================================================
RCS file: /squid/squid3/snmplib/parse.c,v
retrieving revision 1.28
diff -u -r1.28 parse.c
--- snmplib/parse.c 7 Nov 2004 13:55:20 -0000 1.28
+++ snmplib/parse.c 22 Nov 2004 08:18:17 -0000
@@ -41,7 +41,7 @@
 #endif
 #if HAVE_GNUMALLOC_H
 #include <gnumalloc.h>
-#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_)
+#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_) && !defined(__OpenBSD__)
 #include <malloc.h>
 #endif
 #if HAVE_MEMORY_H
Index: snmplib/snmp_api.c
===================================================================
RCS file: /squid/squid3/snmplib/snmp_api.c,v
retrieving revision 1.18
diff -u -r1.18 snmp_api.c
--- snmplib/snmp_api.c 13 Feb 2002 00:41:31 -0000 1.18
+++ snmplib/snmp_api.c 22 Nov 2004 08:18:18 -0000
@@ -42,7 +42,7 @@
 #endif
 #if HAVE_GNUMALLOC_H
 #include <gnumalloc.h>
-#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_)
+#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_) && !defined(__OpenBSD__)
 #include <malloc.h>
 #endif
 #if HAVE_MEMORY_H
Index: snmplib/snmp_msg.c
===================================================================
RCS file: /squid/squid3/snmplib/snmp_msg.c,v
retrieving revision 1.6
diff -u -r1.6 snmp_msg.c
--- snmplib/snmp_msg.c 24 Oct 2001 05:26:12 -0000 1.6
+++ snmplib/snmp_msg.c 22 Nov 2004 08:18:18 -0000
@@ -51,7 +51,7 @@
 #endif
 #if HAVE_GNUMALLOC_H
 #include <gnumalloc.h>
-#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_)
+#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_) && !defined(__OpenBSD__)
 #include <malloc.h>
 #endif
 #if HAVE_MEMORY_H
Index: snmplib/snmp_pdu.c
===================================================================
RCS file: /squid/squid3/snmplib/snmp_pdu.c,v
retrieving revision 1.6
diff -u -r1.6 snmp_pdu.c
--- snmplib/snmp_pdu.c 13 Feb 2002 02:40:33 -0000 1.6
+++ snmplib/snmp_pdu.c 22 Nov 2004 08:18:18 -0000
@@ -51,7 +51,7 @@
 #endif
 #if HAVE_GNUMALLOC_H
 #include <gnumalloc.h>
-#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_)
+#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_) && !defined(__OpenBSD__)
 #include <malloc.h>
 #endif
 #if HAVE_MEMORY_H
Index: snmplib/snmp_vars.c
===================================================================
RCS file: /squid/squid3/snmplib/snmp_vars.c,v
retrieving revision 1.5
diff -u -r1.5 snmp_vars.c
--- snmplib/snmp_vars.c 13 Feb 2002 21:49:48 -0000 1.5
+++ snmplib/snmp_vars.c 22 Nov 2004 08:18:19 -0000
@@ -50,7 +50,7 @@
 #endif
 #if HAVE_GNUMALLOC_H
 #include <gnumalloc.h>
-#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_)
+#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_) && !defined(__OpenBSD__)
 #include <malloc.h>
 #endif
 #if HAVE_MEMORY_H
Index: src/IPInterception.cc
===================================================================
RCS file: /squid/squid3/src/IPInterception.cc,v
retrieving revision 1.7
diff -u -r1.7 IPInterception.cc
--- src/IPInterception.cc 3 Aug 2003 08:09:26 -0000 1.7
+++ src/IPInterception.cc 22 Nov 2004 08:18:20 -0000
@@ -211,7 +211,8 @@
         return -1;
     } else
     {
- int natted = me.sin_addr.s_addr != nt.rdaddr.v4.s_addr;
+//JLH int natted = me.sin_addr.s_addr != nt.rdaddr.v4.s_addr;
+ int natted = me.sin_addr.s_addr != nl.rdaddr.v4.s_addr;
         dst->sin_family = AF_INET;
         dst->sin_port = nl.rdport;
         dst->sin_addr = nl.rdaddr.v4;
Index: src/cachemgr.cc
===================================================================
RCS file: /squid/squid3/src/cachemgr.cc,v
retrieving revision 1.105
diff -u -r1.105 cachemgr.cc
--- src/cachemgr.cc 11 Aug 2003 13:07:56 -0000 1.105
+++ src/cachemgr.cc 22 Nov 2004 08:18:21 -0000
@@ -61,7 +61,7 @@
 #endif
 #if HAVE_GNUMALLOC_H
 #include <gnumalloc.h>
-#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_)
+#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_) && !defined(__OpenBSD__)
 #include <malloc.h>
 #endif
 #if HAVE_MEMORY_H
Index: src/dnsserver.cc
===================================================================
RCS file: /squid/squid3/src/dnsserver.cc,v
retrieving revision 1.65
diff -u -r1.65 dnsserver.cc
--- src/dnsserver.cc 15 Oct 2004 21:12:47 -0000 1.65
+++ src/dnsserver.cc 22 Nov 2004 08:18:21 -0000
@@ -61,7 +61,7 @@
 #endif
 #if HAVE_GNUMALLOC_H
 #include <gnumalloc.h>
-#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_)
+#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_) && !defined(__OpenBSD__)
 #include <malloc.h>
 #endif
 #if HAVE_MEMORY_H
Index: src/main.cc
===================================================================
RCS file: /squid/squid3/src/main.cc,v
retrieving revision 1.394
diff -u -r1.394 main.cc
--- src/main.cc 7 Nov 2004 14:49:44 -0000 1.394
+++ src/main.cc 22 Nov 2004 08:18:22 -0000
@@ -1257,7 +1257,8 @@
 
     if ((cpid = fork()) == 0) {
         /* child */
- execl(script, squid_start_script, 0);
+//JLH execl(script, squid_start_script, 0);
+ execl(script, squid_start_script, NULL);
         _exit(0);
     } else {
         do {
Index: src/squid.h
===================================================================
RCS file: /squid/squid3/src/squid.h,v
retrieving revision 1.239
diff -u -r1.239 squid.h
--- src/squid.h 7 Nov 2004 23:29:50 -0000 1.239
+++ src/squid.h 22 Nov 2004 08:18:23 -0000
@@ -74,7 +74,7 @@
 #endif
 #if HAVE_GNUMALLOC_H
 #include <gnumalloc.h>
-#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_)
+#elif HAVE_MALLOC_H && !defined(_SQUID_FREEBSD_) && !defined(_SQUID_NEXT_) && !defined(__OpenBSD__)
 #include <malloc.h>
 #endif
 #if HAVE_MEMORY_H
Received on Mon Nov 22 2004 - 02:06:33 MST

This archive was generated by hypermail pre-2.1.9 : Tue Nov 30 2004 - 12:00:03 MST