Hi Robert,

At 12.49 19/07/2003, Robert Collins wrote:

On Sat, 2003-07-19 at 20:34, Serassio Guido wrote:
> Hi Robert,
>
> At 13.01 16/07/2003, Robert Collins wrote:
>
> > > This seems to be the biggest left problem :
> >
> >Here, Id is a embedded class of DelayVector. Can you try changing
> >DelayVector::Pointer on line 69 to RefCount<DelayVector> ?
>
> Making this change in delayvector.h, delaytagged.h and delayuser.h all the
> unexpected 'class' errors are gone, this is the compile result:
>
> delay_pools.cc
> c:\work\nt-3.0\src\delayvector.h(76) : error C2027: use of undefined type
> 'DelayVector'
>          c:\work\nt-3.0\src\delayvector.h(41) : see declaration of
> 'DelayVector'

can you change this likewise - RefCount<DelayVector> ?

Rigth !!!


After many other RefCount<>, now all the Dealy Pools code seems to compile fine.
I have attached all the changes.



> It seems to compile fine, but at link time:
>
> Linking...
> test_tools.obj : error LNK2005: "void * __cdecl operator new(unsigned int)"
> ([EMAIL PROTECTED]@Z) already defined in VirtualDeleteOperator.obj
> test_tools.obj : error LNK2005: "void __cdecl operator delete(void *)"
> ([EMAIL PROTECTED]@Z) already defined in VirtualDeleteOperator.obj
> test_tools.obj : error LNK2005: "void * __cdecl operator new[](unsigned
> int)" ([EMAIL PROTECTED]@Z) already defined in VirtualDeleteOperator.obj
> test_tools.obj : error LNK2005: "void __cdecl operator delete[](void *)"
> ([EMAIL PROTECTED]@Z) already defined in VirtualDeleteOperator.obj
> Debug/VirtualDeleteOperator.exe : fatal error LNK1169: one or more multiply
> defined symbols found


You should be able to get MSVC to demangle those operators. They look
like they might be the global operator new and delete operators.

If so, they are meant to be in test_tools, not in
VirtualDeleteOperator.obj.

be sure you aren't defining _SQUID_EXTERNNEW_ in
VirtualDeleteOperator.obj.

I have just tried to force the linker to ignore the duplicate symbols, the executable runs without any error/output.


Oh, and Array.cc shouldn't be compiled anymore - its not needed.

OK.


Regards

Guido

Cheers,
Rob


-
========================================================
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/DelayTagged.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/DelayTagged.h,v
retrieving revision 1.2
diff -u -p -r1.2 DelayTagged.h
--- src/DelayTagged.h   23 May 2003 02:13:05 -0000      1.2
+++ src/DelayTagged.h   19 Jul 2003 11:04:27 -0000
@@ -91,14 +91,14 @@ class Id:public DelayIdComposite
         void *operator new(size_t);
         void operator delete (void *);
         virtual void deleteSelf() const;
-        Id (DelayTagged::Pointer, String &);
+        Id (RefCount<DelayTagged>, String &);
         ~Id();
         virtual int bytesWanted (int min, int max) const;
         virtual void bytesIn(int qty);
         virtual void delayRead(DeferredRead const &);
 
     private:
-        DelayTagged::Pointer theTagged;
+        RefCount<DelayTagged> theTagged;
         DelayTaggedBucket::Pointer theBucket;
     };
 
Index: src/DelayUser.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/DelayUser.h,v
retrieving revision 1.5
diff -u -p -r1.5 DelayUser.h
--- src/DelayUser.h     21 May 2003 02:13:45 -0000      1.5
+++ src/DelayUser.h     19 Jul 2003 11:04:27 -0000
@@ -91,13 +91,13 @@ class Id:public DelayIdComposite
         void *operator new(size_t);
         void operator delete (void *);
         virtual void deleteSelf() const;
-        Id (DelayUser::Pointer, AuthUser *);
+        Id (RefCount<DelayUser>, AuthUser *);
         ~Id();
         virtual int bytesWanted (int min, int max) const;
         virtual void bytesIn(int qty);
 
     private:
-        DelayUser::Pointer theUser;
+        RefCount<DelayUser> theUser;
         DelayUserBucket::Pointer theBucket;
     };
 
Index: src/DelayVector.h
===================================================================
RCS file: /cvsroot/squid/squid3/src/DelayVector.h,v
retrieving revision 1.7
diff -u -p -r1.7 DelayVector.h
--- src/DelayVector.h   21 May 2003 02:13:45 -0000      1.7
+++ src/DelayVector.h   19 Jul 2003 11:04:27 -0000
@@ -66,14 +66,14 @@ class Id:public DelayIdComposite
         void operator delete (void *);
         virtual void deleteSelf() const;
 
-        Id (DelayVector::Pointer,CompositeSelectionDetails &);
+        Id (RefCount<DelayVector>,CompositeSelectionDetails &);
         ~Id();
         virtual int bytesWanted (int min, int max) const;
         virtual void bytesIn(int qty);
         virtual void delayRead(DeferredRead const &);
 
     private:
-        DelayVector::Pointer theVector;
+        RefCount<DelayVector> theVector;
         Vector<DelayIdComposite::Pointer> ids;
         typedef Vector<DelayIdComposite::Pointer>::iterator iterator;
         typedef Vector<DelayIdComposite::Pointer>::const_iterator const_iterator;
Index: src/delay_pools.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/delay_pools.cc,v
retrieving revision 1.13
diff -u -p -r1.13 delay_pools.cc
--- src/delay_pools.cc  20 Jun 2003 02:12:58 -0000      1.13
+++ src/delay_pools.cc  19 Jul 2003 11:04:27 -0000
@@ -92,13 +92,13 @@ class AggregateId:public DelayIdComposit
         void *operator new(size_t);
         void operator delete (void *);
         virtual void deleteSelf() const;
-        AggregateId (Aggregate::Pointer);
+        AggregateId (RefCount<Aggregate>);
         virtual int bytesWanted (int min, int max) const;
         virtual void bytesIn(int qty);
         virtual void delayRead(DeferredRead const &);
 
     private:
-        Aggregate::Pointer theAggregate;
+        RefCount<Aggregate> theAggregate;
     };
 
     friend class AggregateId;
@@ -162,12 +162,12 @@ class Id:public DelayIdComposite
         void *operator new(size_t);
         void operator delete (void *);
         virtual void deleteSelf() const;
-        Id (VectorPool::Pointer, int);
+        Id (RefCount<VectorPool>, int);
         virtual int bytesWanted (int min, int max) const;
         virtual void bytesIn(int qty);
 
     private:
-        VectorPool::Pointer theVector;
+        RefCount<VectorPool> theVector;
         int theIndex;
     };
 };
@@ -259,12 +259,12 @@ class Id:public DelayIdComposite
         void *operator new(size_t);
         void operator delete (void *);
         virtual void deleteSelf() const;
-        Id (ClassCHostPool::Pointer, unsigned char, unsigned char);
+        Id (RefCount<ClassCHostPool>, unsigned char, unsigned char);
         virtual int bytesWanted (int min, int max) const;
         virtual void bytesIn(int qty);
 
     private:
-        ClassCHostPool::Pointer theClassCHost;
+        RefCount<ClassCHostPool> theClassCHost;
         unsigned char theNet;
         unsigned char theHost;
     };
@@ -542,7 +542,7 @@ Aggregate::AggregateId::deleteSelf() con
     delete this;
 }
 
-Aggregate::AggregateId::AggregateId(Aggregate::Pointer anAggregate) : 
theAggregate(anAggregate)
+Aggregate::AggregateId::AggregateId(RefCount<Aggregate> anAggregate) : 
theAggregate(anAggregate)
 {}
 
 int

Reply via email to