Hi Robert,

At 09.49 10/08/2003, Robert Collins wrote:

On Sun, 2003-08-10 at 17:14, Serassio Guido wrote:


> Sorry Robert, but I'm not sure how to better convert > > O *anObject = static_cast <O *>(address); > delete anObject; > > to a static function, please do you can help me ?

Look at my recent checkin - I've done it.

Great ! It works fine !


> >Sounds like mingw have a 'funny' struct definition for in_addr. Perhaps a
> >memset is best for now.
>
> Ok, of course it works.

Henrik has checked in this fix. Are there any remaining issues in HEAD?

There are some little thing already fixed in the nt branch, not sure if mine are the better fixes.
I have attached the changes, and this are the descriptions / fixed errors:


errorpage.cc:
in errorDynamicPageInfoDestroy() a loop counter is seen first as int, after as size_t


protos.h:
c:\work\nt-3.0\src\protos.h(443) : warning C4190: '<Unknown>' has C-linkage specified, but returns UDT 'String' which is incompatible with C
c:\work\nt-3.0\src\squidstring.h(77) : see declaration of 'String'
c:\work\nt-3.0\src\protos.h(444) : warning C4190: '<Unknown>' has C-linkage specified, but returns UDT 'String' which is incompatible with C
c:\work\nt-3.0\src\squidstring.h(77) : see declaration of 'String'
c:\work\nt-3.0\src\protos.h(445) : warning C4190: '<Unknown>' has C-linkage specified, but returns UDT 'String' which is incompatible with C
c:\work\nt-3.0\src\squidstring.h(77) : see declaration of 'String'
c:\work\nt-3.0\src\protos.h(446) : warning C4190: '<Unknown>' has C-linkage specified, but returns UDT 'String' which is incompatible with C
c:\work\nt-3.0\src\squidstring.h(77) : see declaration of 'String'
c:\work\nt-3.0\src\protos.h(447) : warning C4190: '<Unknown>' has C-linkage specified, but returns UDT 'String' which is incompatible with C
c:\work\nt-3.0\src\squidstring.h(77) : see declaration of 'String'


protos.h:
c:\work\nt-3.0\src\protos.h(740) : error C2526: 'storeCreate' : C linkage function cannot return C++ class 'RefCount<class storeIOState>'
c:\work\nt-3.0\src\protos.h(741) : error C2526: 'storeOpen' : C linkage function cannot return C++ class 'RefCount<class storeIOState>'


typedefs.h:
c:\work\nt-3.0\src\httprequest.h(56) : warning C4099: 'HttpRequest' : type name first seen using 'struct' now seen using 'class'
c:\work\nt-3.0\src\typedefs.h(202) : see declaration of 'HttpRequest'


ACLRequestHeaderStrategy.h
c:\work\nt-3.0\src\aclrequestheaderstrategy.h(88) : error C2059: syntax error : 'constant'


ACLStrategised.h
c:\work\nt-3.0\src\aclreplyheaderstrategy.h(88) : error C2059: syntax error : 'constant'


ACLReplyHeaderStrategy.h:
c:\work\nt-3.0\src\aclreplyheaderstrategy.h(87) : error C2059: syntax error : 'constant'


Regards

Guido



-
========================================================
Guido Serassio
Acme Consulting S.r.l.
Via Gorizia, 69             10136 - Torino - ITALY
Tel. : +39.011.3249426      Fax. : +39.011.3293665
Email: [EMAIL PROTECTED]
WWW: http://www.acmeconsulting.it/
Index: src/ACLReplyHeaderStrategy.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/ACLReplyHeaderStrategy.h,v
retrieving revision 1.3
diff -u -p -r1.3 ACLReplyHeaderStrategy.h
--- src/ACLReplyHeaderStrategy.h        15 Jul 2003 02:12:42 -0000      1.3
+++ src/ACLReplyHeaderStrategy.h        10 Aug 2003 09:07:58 -0000
@@ -84,6 +84,6 @@ ACLReplyHeaderStrategy<header>::Instance
 }
 
 template <http_hdr_type header>
-ACLReplyHeaderStrategy<header> (* ACLReplyHeaderStrategy<header>::Instance_)(NULL);
+ACLReplyHeaderStrategy<header> * ACLReplyHeaderStrategy<header>::Instance_ = NULL;
 
 #endif /* SQUID_REPLYHEADERSTRATEGY_H */
Index: src/ACLRequestHeaderStrategy.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/ACLRequestHeaderStrategy.h,v
retrieving revision 1.6
diff -u -p -r1.6 ACLRequestHeaderStrategy.h
--- src/ACLRequestHeaderStrategy.h      15 Jul 2003 02:12:43 -0000      1.6
+++ src/ACLRequestHeaderStrategy.h      10 Aug 2003 09:07:58 -0000
@@ -85,6 +85,6 @@ ACLRequestHeaderStrategy<header>::Instan
 }
 
 template <http_hdr_type header>
-ACLRequestHeaderStrategy<header> (* ACLRequestHeaderStrategy<header>::Instance_) 
(NULL);
+ACLRequestHeaderStrategy<header> * ACLRequestHeaderStrategy<header>::Instance_ = NULL;
 
 #endif /* SQUID_REQUESTHEADERSTRATEGY_H */
Index: src/ACLStrategised.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/ACLStrategised.h,v
retrieving revision 1.5
diff -u -p -r1.5 ACLStrategised.h
--- src/ACLStrategised.h        5 Aug 2003 02:12:48 -0000       1.5
+++ src/ACLStrategised.h        10 Aug 2003 09:07:58 -0000
@@ -76,7 +76,7 @@ private:
 /* implementation follows */
 
 template <class MatchType>
-MemPool (*ACLStrategised<MatchType>::Pool)(NULL);
+MemPool *ACLStrategised<MatchType>::Pool = NULL;
 
 template <class MatchType>
 void *
Index: src/errorpage.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/errorpage.cc,v
retrieving revision 1.15
diff -u -p -r1.15 errorpage.cc
--- src/errorpage.cc    10 Jul 2003 02:12:48 -0000      1.15
+++ src/errorpage.cc    10 Aug 2003 09:07:58 -0000
@@ -270,14 +270,18 @@ errorDynamicPageInfoDestroy(ErrorDynamic
 static int
 errorPageId(const char *page_name)
 {
-    for (int i = 0; i < ERR_MAX; i++) {
-        if (strcmp(err_type_str[i], page_name) == 0)
-            return i;
+    {
+        for (int i = 0; i < ERR_MAX; i++) {
+            if (strcmp(err_type_str[i], page_name) == 0)
+                return i;
+        }
     }
-
-    for (size_t i = 0; i < ErrorDynamicPages.size(); i++) {
-        if (strcmp(ErrorDynamicPages.items[i]->page_name, page_name) == 0)
-            return i + ERR_MAX;
+    
+    {
+        for (size_t i = 0; i < ErrorDynamicPages.size(); i++) {
+            if (strcmp(ErrorDynamicPages.items[i]->page_name, page_name) == 0)
+                return i + ERR_MAX;
+        }
     }
 
     return ERR_NONE;
Index: src/protos.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/protos.h,v
retrieving revision 1.36
diff -u -p -r1.36 protos.h
--- src/protos.h        5 Aug 2003 02:12:49 -0000       1.36
+++ src/protos.h        10 Aug 2003 09:07:59 -0000
@@ -440,11 +440,11 @@ SQUIDCEXTERN HttpHdrContRange *httpHeade
 SQUIDCEXTERN const char *httpHeaderGetStr(const HttpHeader * hdr, http_hdr_type id);
 SQUIDCEXTERN const char *httpHeaderGetLastStr(const HttpHeader * hdr, http_hdr_type 
id);
 SQUIDCEXTERN const char *httpHeaderGetAuth(const HttpHeader * hdr, http_hdr_type id, 
const char *auth_scheme);
-SQUIDCEXTERN String httpHeaderGetList(const HttpHeader * hdr, http_hdr_type id);
-SQUIDCEXTERN String httpHeaderGetStrOrList(const HttpHeader * hdr, http_hdr_type id);
-SQUIDCEXTERN String httpHeaderGetByName(const HttpHeader * hdr, const char *name);
-SQUIDCEXTERN String httpHeaderGetListMember(const HttpHeader * hdr, http_hdr_type id, 
const char *member, const char separator);
-SQUIDCEXTERN String httpHeaderGetByNameListMember(const HttpHeader * hdr, const char 
*name, const char *member, const char separator);
+extern String httpHeaderGetList(const HttpHeader * hdr, http_hdr_type id);
+extern String httpHeaderGetStrOrList(const HttpHeader * hdr, http_hdr_type id);
+extern String httpHeaderGetByName(const HttpHeader * hdr, const char *name);
+extern String httpHeaderGetListMember(const HttpHeader * hdr, http_hdr_type id, const 
char *member, const char separator);
+extern String httpHeaderGetByNameListMember(const HttpHeader * hdr, const char *name, 
const char *member, const char separator);
 SQUIDCEXTERN int httpHeaderDelByName(HttpHeader * hdr, const char *name);
 SQUIDCEXTERN int httpHeaderDelById(HttpHeader * hdr, http_hdr_type id);
 SQUIDCEXTERN void httpHeaderDelAt(HttpHeader * hdr, HttpHeaderPos pos);
@@ -737,8 +737,8 @@ SQUIDCEXTERN void storeReplSetup(void);
 
 /* store_io.c */
 #include "StoreIOState.h"
-SQUIDCEXTERN StoreIOState::Pointer storeCreate(StoreEntry *, STFNCB *, STIOCB *, void 
*);
-SQUIDCEXTERN StoreIOState::Pointer storeOpen(StoreEntry *, STFNCB *, STIOCB *, void 
*);
+extern StoreIOState::Pointer storeCreate(StoreEntry *, STFNCB *, STIOCB *, void *);
+extern StoreIOState::Pointer storeOpen(StoreEntry *, STFNCB *, STIOCB *, void *);
 SQUIDCEXTERN void storeClose(StoreIOState::Pointer);
 SQUIDCEXTERN void storeRead(StoreIOState::Pointer, char *, size_t, off_t, STRCB *, 
void *);
 SQUIDCEXTERN void storeIOWrite(StoreIOState::Pointer, char const *, size_t, off_t, 
FREE *);
Index: src/typedefs.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/typedefs.h,v
retrieving revision 1.29
diff -u -p -r1.29 typedefs.h
--- src/typedefs.h      23 Jul 2003 02:12:51 -0000      1.29
+++ src/typedefs.h      10 Aug 2003 09:07:59 -0000
@@ -199,7 +199,7 @@ typedef struct _header_mangler header_ma
 
 typedef struct _body_size body_size;
 
-typedef struct HttpRequest request_t;
+typedef class HttpRequest request_t;
 
 typedef struct _AccessLogEntry AccessLogEntry;
 

Reply via email to