--- /dev/null
+diff -urN apt-0.3.19cnc55.org/apt-pkg/acquire-method.cc apt-0.3.19cnc55/apt-pkg/acquire-method.cc
+--- apt-0.3.19cnc55.org/apt-pkg/acquire-method.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/acquire-method.cc Tue Mar 12 17:18:31 2002
+@@ -27,6 +27,8 @@
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <unistd.h>
++#include <iostream>
++using namespace std;
+ /*}}}*/
+
+ // AcqMethod::pkgAcqMethod - Constructor /*{{{*/
+@@ -85,7 +87,7 @@
+ void pkgAcqMethod::Fail(string Err,bool Transient)
+ {
+ // Strip out junk from the error messages
+- for (char *I = Err.begin(); I != Err.end(); I++)
++ for (string::iterator I = Err.begin(); I != Err.end(); I++)
+ {
+ if (*I == '\r')
+ *I = ' ';
+@@ -285,10 +287,10 @@
+ {
+ ::Configuration &Cnf = *_config;
+
+- const char *I = Message.begin();
++ const char *I = Message.data();
+
+ unsigned int Length = strlen("Config-Item");
+- for (; I + Length < Message.end(); I++)
++ for (; I + Length < Message.data()+Message.size(); I++)
+ {
+ // Not a config item
+ if (I[Length] != ':' || stringcasecmp(I,I+Length,"Config-Item") != 0)
+@@ -296,11 +298,11 @@
+
+ I += Length + 1;
+
+- for (; I < Message.end() && *I == ' '; I++);
++ for (; I < Message.data()+Message.size() && *I == ' '; I++);
+ const char *Equals = I;
+- for (; Equals < Message.end() && *Equals != '='; Equals++);
++ for (; Equals < Message.data()+Message.size() && *Equals != '='; Equals++);
+ const char *End = Equals;
+- for (; End < Message.end() && *End != '\n'; End++);
++ for (; End < Message.data()+Message.size() && *End != '\n'; End++);
+ if (End == Equals)
+ return false;
+
+diff -urN apt-0.3.19cnc55.org/apt-pkg/acquire-worker.cc apt-0.3.19cnc55/apt-pkg/acquire-worker.cc
+--- apt-0.3.19cnc55.org/apt-pkg/acquire-worker.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/acquire-worker.cc Tue Mar 12 17:18:31 2002
+@@ -131,7 +131,7 @@
+ // Setup the FDs
+ dup2(Pipes[1],STDOUT_FILENO);
+ dup2(Pipes[2],STDIN_FILENO);
+- dup2(((filebuf *)clog.rdbuf())->fd(),STDERR_FILENO);
++// dup2(((filebuf *)clog.rdbuf())->fd(),STDERR_FILENO);
+ SetCloseExec(STDOUT_FILENO,false);
+ SetCloseExec(STDIN_FILENO,false);
+ SetCloseExec(STDERR_FILENO,false);
+@@ -465,7 +465,7 @@
+ int Res;
+ do
+ {
+- Res = write(OutFd,OutQueue.begin(),OutQueue.length());
++ Res = write(OutFd,OutQueue.data(),OutQueue.length());
+ }
+ while (Res < 0 && errno == EINTR);
+
+diff -urN apt-0.3.19cnc55.org/apt-pkg/acquire-worker.h apt-0.3.19cnc55/apt-pkg/acquire-worker.h
+--- apt-0.3.19cnc55.org/apt-pkg/acquire-worker.h Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/acquire-worker.h Tue Mar 12 17:18:38 2002
+@@ -21,10 +21,10 @@
+ // Interfacing to the method process
+ class pkgAcquire::Worker
+ {
+- friend pkgAcquire;
++ friend class pkgAcquire;
+
+ protected:
+- friend Queue;
++ friend class Queue;
+
+ /* Linked list starting at a Queue and a linked list starting
+ at Acquire */
+diff -urN apt-0.3.19cnc55.org/apt-pkg/acquire.cc apt-0.3.19cnc55/apt-pkg/acquire.cc
+--- apt-0.3.19cnc55.org/apt-pkg/acquire.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/acquire.cc Tue Mar 12 17:18:31 2002
+@@ -365,7 +365,7 @@
+ I->Shutdown(false);
+
+ // Shut down the items
+- for (Item **I = Items.begin(); I != Items.end(); I++)
++ for (vector<Item *>::iterator I = Items.begin(); I != Items.end(); I++)
+ (*I)->Finished();
+
+ if (_error->PendingError())
+diff -urN apt-0.3.19cnc55.org/apt-pkg/acquire.h apt-0.3.19cnc55/apt-pkg/acquire.h
+--- apt-0.3.19cnc55.org/apt-pkg/acquire.h Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/acquire.h Tue Mar 12 17:18:38 2002
+@@ -34,6 +34,7 @@
+
+ #include <vector>
+ #include <string>
++using namespace std;
+
+ #ifdef __GNUG__
+ #pragma interface "apt-pkg/acquire.h"
+@@ -52,8 +53,8 @@
+ class Worker;
+ struct MethodConfig;
+ struct ItemDesc;
+- friend Item;
+- friend Queue;
++ friend class Item;
++ friend class Queue;
+
+ protected:
+
+@@ -100,8 +101,8 @@
+ // Simple iteration mechanism
+ inline Worker *WorkersBegin() {return Workers;};
+ Worker *WorkerStep(Worker *I);
+- inline Item **ItemsBegin() {return Items.begin();};
+- inline Item **ItemsEnd() {return Items.end();};
++ inline Item **ItemsBegin() {return &*Items.begin();};
++ inline Item **ItemsEnd() {return &*Items.end();};
+
+ // Iterate over queued Item URIs
+ class UriIterator;
+@@ -132,8 +133,8 @@
+ // List of possible items queued for download.
+ class pkgAcquire::Queue
+ {
+- friend pkgAcquire;
+- friend pkgAcquire::UriIterator;
++ friend class pkgAcquire;
++ friend class pkgAcquire::UriIterator;
+ Queue *Next;
+
+ public:
+diff -urN apt-0.3.19cnc55.org/apt-pkg/algorithms.cc apt-0.3.19cnc55/apt-pkg/algorithms.cc
+--- apt-0.3.19cnc55.org/apt-pkg/algorithms.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/algorithms.cc Tue Mar 12 17:21:54 2002
+@@ -20,7 +20,7 @@
+ #include <apt-pkg/algorithms.h>
+ #include <apt-pkg/error.h>
+ #include <apt-pkg/configuration.h>
+-#include <iostream.h>
++#include <iostream>
+ /*}}}*/
+ #include <i18n.h>
+
+diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/cdromutl.h apt-0.3.19cnc55/apt-pkg/contrib/cdromutl.h
+--- apt-0.3.19cnc55.org/apt-pkg/contrib/cdromutl.h Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/contrib/cdromutl.h Tue Mar 12 17:18:38 2002
+@@ -11,6 +11,7 @@
+ #define PKGLIB_ACQUIRE_METHOD_H
+
+ #include <string>
++using namespace std;
+
+ #ifdef __GNUG__
+ #pragma interface "apt-pkg/cdromutl.h"
+diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/configuration.cc apt-0.3.19cnc55/apt-pkg/contrib/configuration.cc
+--- apt-0.3.19cnc55.org/apt-pkg/contrib/configuration.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/contrib/configuration.cc Tue Mar 12 17:19:51 2002
+@@ -20,7 +20,8 @@
+ #include <apt-pkg/strutl.h>
+
+ #include <stdio.h>
+-#include <fstream.h>
++#include <fstream>
++#include <iostream>
+ /*}}}*/
+
+ Configuration *_config = new Configuration;
+@@ -84,7 +85,7 @@
+ if (Len != 0)
+ {
+ for (; I != 0; Last = &I->Next, I = I->Next)
+- if ((Res = stringcasecmp(I->Tag.begin(),I->Tag.end(),S,S + Len)) == 0)
++ if ((Res = stringcasecmp(I->Tag.data(),I->Tag.data()+I->Tag.size(),S,S + Len)) == 0)
+ break;
+ }
+ else
+@@ -429,7 +430,7 @@
+ unsigned Depth)
+ {
+ // Open the stream for reading
+- ifstream F(FName.c_str(),ios::in | ios::nocreate);
++ ifstream F(FName.c_str(),ios::in);
+ if (!F != 0)
+ return _error->Errno("ifstream::ifstream","Opening configuration file %s",FName.c_str());
+
+diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/configuration.h apt-0.3.19cnc55/apt-pkg/contrib/configuration.h
+--- apt-0.3.19cnc55.org/apt-pkg/contrib/configuration.h Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/contrib/configuration.h Tue Mar 12 17:18:38 2002
+@@ -33,6 +33,7 @@
+ #endif
+
+ #include <string>
++using namespace std;
+
+ class Configuration
+ {
+@@ -70,7 +71,7 @@
+ string FindFile(const char *Name,const char *Default = 0) const;
+ string FindDir(const char *Name,const char *Default = 0) const;
+ int FindI(const char *Name,int Default = 0) const;
+- int FindI(string Name,bool Default = 0) const {return FindI(Name.c_str(),Default);};
++ int FindI(string Name,bool Default = 0) const {return FindI(Name.c_str(),int (Default));};
+ bool FindB(const char *Name,bool Default = false) const;
+ bool FindB(string Name,bool Default = false) const {return FindB(Name.c_str(),Default);};
+ string FindAny(const char *Name,const char *Default = 0) const;
+diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/error.cc apt-0.3.19cnc55/apt-pkg/contrib/error.cc
+--- apt-0.3.19cnc55.org/apt-pkg/contrib/error.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/contrib/error.cc Tue Mar 12 17:18:31 2002
+@@ -26,6 +26,9 @@
+ #include <stdarg.h>
+ #include <unistd.h>
+
++#include <iostream>
++using namespace std;
++
+ #include "config.h"
+ /*}}}*/
+
+diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/error.h apt-0.3.19cnc55/apt-pkg/contrib/error.h
+--- apt-0.3.19cnc55.org/apt-pkg/contrib/error.h Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/contrib/error.h Tue Mar 12 17:18:38 2002
+@@ -45,6 +45,7 @@
+ #endif
+
+ #include <string>
++using namespace std;
+
+ class GlobalError
+ {
+diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/fileutl.cc apt-0.3.19cnc55/apt-pkg/contrib/fileutl.cc
+--- apt-0.3.19cnc55.org/apt-pkg/contrib/fileutl.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/contrib/fileutl.cc Tue Mar 12 17:18:31 2002
+@@ -28,6 +28,8 @@
+ #include <sys/wait.h>
+ #include <signal.h>
+ #include <errno.h>
++#include <iostream>
++using namespace std;
+ /*}}}*/
+
+ // CopyFile - Buffered copy of a file /*{{{*/
+diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/fileutl.h apt-0.3.19cnc55/apt-pkg/contrib/fileutl.h
+--- apt-0.3.19cnc55.org/apt-pkg/contrib/fileutl.h Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/contrib/fileutl.h Tue Mar 12 17:18:38 2002
+@@ -26,6 +26,7 @@
+ #endif
+
+ #include <string>
++using namespace std;
+
+ class FileFd
+ {
+diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/i18n.h apt-0.3.19cnc55/apt-pkg/contrib/i18n.h
+--- apt-0.3.19cnc55.org/apt-pkg/contrib/i18n.h Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/contrib/i18n.h Tue Mar 12 17:18:31 2002
+@@ -46,8 +46,8 @@
+ # define bindtextdomain(Domain, Directory) /* empty */
+ # undef textdomain
+ # define textdomain(Domain) /* empty */
+-# undef setlocale
+-# define setlocale(cat, log)
++//# undef setlocale
++//# define setlocale(cat, log)
+ # define _(a) a
+ #endif
+
+diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/md5.cc apt-0.3.19cnc55/apt-pkg/contrib/md5.cc
+--- apt-0.3.19cnc55.org/apt-pkg/contrib/md5.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/contrib/md5.cc Tue Mar 12 17:18:31 2002
+@@ -191,7 +191,7 @@
+ /* Converts the hex string into a set of chars */
+ bool MD5SumValue::Set(string Str)
+ {
+- return Hex2Num(Str.begin(),Str.end(),Sum,sizeof(Sum));
++ return Hex2Num(Str.data(),Str.data()+Str.size(),Sum,sizeof(Sum));
+ }
+ /*}}}*/
+ // MD5SumValue::Value - Convert the number into a string /*{{{*/
+diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/md5.h apt-0.3.19cnc55/apt-pkg/contrib/md5.h
+--- apt-0.3.19cnc55.org/apt-pkg/contrib/md5.h Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/contrib/md5.h Tue Mar 12 17:18:38 2002
+@@ -28,12 +28,13 @@
+ #endif
+
+ #include <string>
++using namespace std;
+
+ class MD5Summation;
+
+ class MD5SumValue
+ {
+- friend MD5Summation;
++ friend class MD5Summation;
+ unsigned char Sum[4*4];
+
+ public:
+diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/mmap.h apt-0.3.19cnc55/apt-pkg/contrib/mmap.h
+--- apt-0.3.19cnc55.org/apt-pkg/contrib/mmap.h Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/contrib/mmap.h Tue Mar 12 17:18:38 2002
+@@ -92,7 +92,7 @@
+ unsigned long RawAllocate(unsigned long Size,unsigned long Aln = 0);
+ unsigned long Allocate(unsigned long ItemSize);
+ unsigned long WriteString(const char *String,unsigned long Len = (unsigned long)-1);
+- inline unsigned long WriteString(string S) {return WriteString(S.begin(),S.size());};
++ inline unsigned long WriteString(string S) {return WriteString(S.data(),S.size());};
+ void UsePools(Pool &P,unsigned int Count) {Pools = &P; PoolCount = Count;};
+
+ DynamicMMap(FileFd &F,unsigned long Flags,unsigned long WorkSpace = 2*1024*1024);
+diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/progress.cc apt-0.3.19cnc55/apt-pkg/contrib/progress.cc
+--- apt-0.3.19cnc55.org/apt-pkg/contrib/progress.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/contrib/progress.cc Tue Mar 12 17:18:31 2002
+@@ -15,6 +15,7 @@
+ #include <apt-pkg/error.h>
+ #include <apt-pkg/configuration.h>
+ #include <stdio.h>
++#include <iostream>
+ /*}}}*/
+ #include <i18n.h>
+
+diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/progress.h apt-0.3.19cnc55/apt-pkg/contrib/progress.h
+--- apt-0.3.19cnc55.org/apt-pkg/contrib/progress.h Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/contrib/progress.h Tue Mar 12 17:18:38 2002
+@@ -27,6 +27,7 @@
+
+ #include <string>
+ #include <sys/time.h>
++using namespace std;
+
+ class Configuration;
+ class OpProgress
+diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/strutl.cc apt-0.3.19cnc55/apt-pkg/contrib/strutl.cc
+--- apt-0.3.19cnc55.org/apt-pkg/contrib/strutl.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/contrib/strutl.cc Tue Mar 12 17:18:31 2002
+@@ -464,22 +464,22 @@
+ {
+ // Look for a matching tag.
+ int Length = strlen(Tag);
+- for (string::iterator I = Message.begin(); I + Length < Message.end(); I++)
++ for (const char *I = Message.data(); I + Length < Message.data()+Message.size(); I++)
+ {
+ // Found the tag
+ if (I[Length] == ':' && stringcasecmp(I,I+Length,Tag) == 0)
+ {
+ // Find the end of line and strip the leading/trailing spaces
+- string::iterator J;
++ const char *J;
+ I += Length + 1;
+- for (; isspace(*I) != 0 && I < Message.end(); I++);
+- for (J = I; *J != '\n' && J < Message.end(); J++);
++ for (; isspace(*I) != 0 && I < Message.data()+Message.size(); I++);
++ for (J = I; *J != '\n' && J < Message.data()+Message.size(); J++);
+ for (; J > I && isspace(J[-1]) != 0; J--);
+
+ return string(I,J-I);
+ }
+
+- for (; *I != '\n' && I < Message.end(); I++);
++ for (; *I != '\n' && I < Message.data()+Message.size(); I++);
+ }
+
+ // Failed to find a match
+@@ -492,7 +492,7 @@
+ // ---------------------------------------------------------------------
+ /* This inspects the string to see if it is true or if it is false and
+ then returns the result. Several varients on true/false are checked. */
+-int StringToBool(string Text,int Default = -1)
++int StringToBool(string Text,int Default)
+ {
+ char *End;
+ int Res = strtol(Text.c_str(),&End,0);
+@@ -867,16 +867,16 @@
+ matched against the argument */
+ bool CheckDomainList(string Host,string List)
+ {
+- string::const_iterator Start = List.begin();
+- for (string::const_iterator Cur = List.begin(); Cur <= List.end(); Cur++)
++ const char *Start = List.data();
++ for (const char *Cur = List.data(); Cur <= List.data()+List.size(); Cur++)
+ {
+- if (Cur < List.end() && *Cur != ',')
++ if (Cur < List.data()+List.size() && *Cur != ',')
+ continue;
+
+ // Match the end of the string..
+ if ((Host.size() >= (unsigned)(Cur - Start)) &&
+ Cur - Start != 0 &&
+- stringcasecmp(Host.end() - (Cur - Start),Host.end(),Start,Cur) == 0)
++ stringcasecmp(Host.data()+Host.size() - (Cur - Start),Host.data()+Host.size(),Start,Cur) == 0)
+ return true;
+
+ Start = Cur + 1;
+diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/strutl.h apt-0.3.19cnc55/apt-pkg/contrib/strutl.h
+--- apt-0.3.19cnc55.org/apt-pkg/contrib/strutl.h Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/contrib/strutl.h Tue Mar 12 17:18:38 2002
+@@ -24,7 +24,8 @@
+ #include <string>
+ #include <vector>
+ #include <time.h>
+-
++using namespace std;
++
+ char *_strstrip(char *String);
+ char *_strtabexpand(char *String,size_t Len);
+ bool ParseQuoteWord(const char *&String,string &Res);
+@@ -49,11 +50,11 @@
+
+ int stringcmp(const char *A,const char *AEnd,const char *B,const char *BEnd);
+ inline int stringcmp(const char *A,const char *AEnd,const char *B) {return stringcmp(A,AEnd,B,B+strlen(B));};
+-inline int stringcmp(string A,const char *B) {return stringcmp(A.begin(),A.end(),B,B+strlen(B));};
++inline int stringcmp(string A,const char *B) {return stringcmp(A.data(),A.data()+A.size(),B,B+strlen(B));};
+ int stringcasecmp(const char *A,const char *AEnd,const char *B,const char *BEnd);
+ inline int stringcasecmp(const char *A,const char *AEnd,const char *B) {return stringcasecmp(A,AEnd,B,B+strlen(B));};
+-inline int stringcasecmp(string A,const char *B) {return stringcasecmp(A.begin(),A.end(),B,B+strlen(B));};
+-inline int stringcasecmp(string A,string B) {return stringcasecmp(A.begin(),A.end(),B.begin(),B.end());};
++inline int stringcasecmp(string A,const char *B) {return stringcasecmp(A.data(),A.data()+A.size(),B,B+strlen(B));};
++inline int stringcasecmp(string A,string B) {return stringcasecmp(A.data(),A.data()+A.size(),B.data(),B.data()+B.size());};
+
+ class URI
+ {
+diff -urN apt-0.3.19cnc55.org/apt-pkg/deb/deblistparser.cc apt-0.3.19cnc55/apt-pkg/deb/deblistparser.cc
+--- apt-0.3.19cnc55.org/apt-pkg/deb/deblistparser.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/deb/deblistparser.cc Tue Mar 12 17:18:31 2002
+@@ -17,6 +17,7 @@
+ #include <apt-pkg/crc-16.h>
+
+ #include <system.h>
++#include <ctype.h>
+ /*}}}*/
+
+ // ListParser::debListParser - Constructor /*{{{*/
+@@ -483,7 +484,7 @@
+ if (Section.Find("Architecture",Start,Stop) == false)
+ return true;
+
+- if (stringcmp(Start,Stop,Arch.begin(),Arch.end()) == 0)
++ if (stringcmp(Start,Stop,Arch.data(),Arch.data()+Arch.size()) == 0)
+ return true;
+
+ if (stringcmp(Start,Stop,"all") == 0)
+diff -urN apt-0.3.19cnc55.org/apt-pkg/deb/debsrcrecords.cc apt-0.3.19cnc55/apt-pkg/deb/debsrcrecords.cc
+--- apt-0.3.19cnc55.org/apt-pkg/deb/debsrcrecords.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/deb/debsrcrecords.cc Tue Mar 12 17:18:31 2002
+@@ -33,17 +33,17 @@
+ return 0;
+ // XXX no bounds check: exploitable?
+ // Strip any leading spaces
+- string::const_iterator Start = Bins.begin();
+- for (; Start != Bins.end() && isspace(*Start) != 0; Start++);
++ const char *Start = Bins.data();
++ for (; Start != Bins.data()+Bins.size() && isspace(*Start) != 0; Start++);
+
+- string::const_iterator Pos = Start;
+- while (Pos != Bins.end())
++ const char *Pos = Start;
++ while (Pos != Bins.data()+Bins.size())
+ {
+ // Skip to the next ','
+- for (; Pos != Bins.end() && *Pos != ','; Pos++);
++ for (; Pos != Bins.data()+Bins.size() && *Pos != ','; Pos++);
+
+ // Back remove spaces
+- string::const_iterator End = Pos;
++ const char *End = Pos;
+ for (; End > Start && (End[-1] == ',' || isspace(End[-1]) != 0); End--);
+
+ // Stash the string
+@@ -54,7 +54,7 @@
+ *Buf++ = 0;
+
+ // Advance pos
+- for (; Pos != Bins.end() && (*Pos == ',' || isspace(*Pos) != 0); Pos++);
++ for (; Pos != Bins.data()+Bins.size() && (*Pos == ',' || isspace(*Pos) != 0); Pos++);
+ Start = Pos;
+ }
+
+diff -urN apt-0.3.19cnc55.org/apt-pkg/deb/dpkginit.cc apt-0.3.19cnc55/apt-pkg/deb/dpkginit.cc
+--- apt-0.3.19cnc55.org/apt-pkg/deb/dpkginit.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/deb/dpkginit.cc Tue Mar 12 17:18:31 2002
+@@ -23,6 +23,7 @@
+ #include <sys/types.h>
+ #include <unistd.h>
+ #include <dirent.h>
++#include <ctype.h>
+ /*}}}*/
+
+ // DpkgLock::pkgDpkgLock - Constructor /*{{{*/
+diff -urN apt-0.3.19cnc55.org/apt-pkg/deb/dpkgpm.cc apt-0.3.19cnc55/apt-pkg/deb/dpkgpm.cc
+--- apt-0.3.19cnc55.org/apt-pkg/deb/dpkgpm.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/deb/dpkgpm.cc Tue Mar 12 17:18:31 2002
+@@ -23,6 +23,8 @@
+ #include <signal.h>
+ #include <errno.h>
+ #include <stdio.h>
++#include <iostream>
++using namespace std;
+ /*}}}*/
+
+ // DPkgPM::pkgDPkgPM - Constructor /*{{{*/
+@@ -200,7 +202,7 @@
+
+ /* Feed the filename of each package that is pending install
+ into the pipe. */
+- if (Fd.Write(I->File.begin(),I->File.length()) == false ||
++ if (Fd.Write(I->File.data(),I->File.length()) == false ||
+ Fd.Write("\n",1) == false)
+ {
+ kill(Process,SIGINT);
+diff -urN apt-0.3.19cnc55.org/apt-pkg/pkgcache.cc apt-0.3.19cnc55/apt-pkg/pkgcache.cc
+--- apt-0.3.19cnc55.org/apt-pkg/pkgcache.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/pkgcache.cc Tue Mar 12 17:18:31 2002
+@@ -144,7 +144,7 @@
+ for (const char *I = Str.begin(); I != Str.end(); I++)
+ Hash = 5*Hash + tolower(*I);
+ #else
+- for (const char *I = Str.begin(); I != Str.end(); I++)
++ for (const char *I = Str.data(); I != Str.data()+Str.size(); I++)
+ Hash = 5*Hash + *I;
+ #endif
+ return Hash % _count(HeaderP->HashTable);
+@@ -179,7 +179,7 @@
+ return PkgIterator(*this,Pkg);
+ #else
+ if (Pkg->Name != 0 && StrP[Pkg->Name] == Name[0] &&
+- stringcmp(Name.begin(),Name.end(),StrP + Pkg->Name) == 0)
++ stringcmp(Name.data(),Name.data()+Name.size(),StrP + Pkg->Name) == 0)
+ return PkgIterator(*this,Pkg);
+ #endif
+ }
+diff -urN apt-0.3.19cnc55.org/apt-pkg/pkgcache.h apt-0.3.19cnc55/apt-pkg/pkgcache.h
+--- apt-0.3.19cnc55.org/apt-pkg/pkgcache.h Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/pkgcache.h Tue Mar 12 17:18:38 2002
+@@ -48,12 +48,12 @@
+ class PrvIterator;
+ class PkgFileIterator;
+ class VerFileIterator;
+- friend PkgIterator;
+- friend VerIterator;
+- friend DepIterator;
+- friend PrvIterator;
+- friend PkgFileIterator;
+- friend VerFileIterator;
++ friend class PkgIterator;
++ friend class VerIterator;
++ friend class DepIterator;
++ friend class PrvIterator;
++ friend class PkgFileIterator;
++ friend class VerFileIterator;
+
+ // These are all the constants used in the cache structures
+ struct Dep
+diff -urN apt-0.3.19cnc55.org/apt-pkg/pkgcachegen.cc apt-0.3.19cnc55/apt-pkg/pkgcachegen.cc
+--- apt-0.3.19cnc55.org/apt-pkg/pkgcachegen.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/pkgcachegen.cc Tue Mar 12 17:18:31 2002
+@@ -108,7 +108,7 @@
+ int Res = 1;
+ for (; Ver.end() == false; Last = &Ver->NextVer, Ver++)
+ {
+- Res = _system->versionCompare(Version.begin(),Version.end(),Ver.VerStr(),
++ Res = _system->versionCompare(Version.data(),Version.data()+Version.size(),Ver.VerStr(),
+ Ver.VerStr() + strlen(Ver.VerStr()));
+ if (Res >= 0) {
+ break;
+@@ -158,7 +158,7 @@
+ {
+ for (; Ver.end() == false; Last = &Ver->NextVer, Ver++)
+ {
+- Res = _system->versionCompare(Version.begin(),Version.end(),Ver.VerStr(),
++ Res = _system->versionCompare(Version.data(),Version.data()+Version.size(),Ver.VerStr(),
+ Ver.VerStr() + strlen(Ver.VerStr()));
+ if (Res != 0)
+ break;
+diff -urN apt-0.3.19cnc55.org/apt-pkg/pkgcachegen.h apt-0.3.19cnc55/apt-pkg/pkgcachegen.h
+--- apt-0.3.19cnc55.org/apt-pkg/pkgcachegen.h Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/pkgcachegen.h Tue Mar 12 17:18:38 2002
+@@ -39,7 +39,7 @@
+ public:
+
+ class ListParser;
+- friend ListParser;
++ friend class ListParser;
+
+ protected:
+
+@@ -74,7 +74,7 @@
+ class pkgCacheGenerator::ListParser
+ {
+ pkgCacheGenerator *Owner;
+- friend pkgCacheGenerator;
++ friend class pkgCacheGenerator;
+
+ // Some cache items
+ pkgCache::VerIterator OldDepVer;
+diff -urN apt-0.3.19cnc55.org/apt-pkg/pkgrecords.h apt-0.3.19cnc55/apt-pkg/pkgrecords.h
+--- apt-0.3.19cnc55.org/apt-pkg/pkgrecords.h Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/pkgrecords.h Tue Mar 12 17:18:38 2002
+@@ -60,7 +60,7 @@
+ protected:
+
+ public:
+- friend pkgRecords;
++ friend class pkgRecords;
+
+ virtual bool Jump(pkgCache::VerFileIterator const &Ver) = 0;
+
+diff -urN apt-0.3.19cnc55.org/apt-pkg/rpm/rpmfactory.h apt-0.3.19cnc55/apt-pkg/rpm/rpmfactory.h
+--- apt-0.3.19cnc55.org/apt-pkg/rpm/rpmfactory.h Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/rpm/rpmfactory.h Tue Mar 12 17:18:38 2002
+@@ -4,7 +4,7 @@
+
+ #include <apt-pkg/systemfactory.h>
+ #include <map>
+-#include <slist>
++#include <list>
+ #include <vector>
+
+ class RPMFactory : public SystemFactory
+diff -urN apt-0.3.19cnc55.org/apt-pkg/rpm/rpmlistparser.cc apt-0.3.19cnc55/apt-pkg/rpm/rpmlistparser.cc
+--- apt-0.3.19cnc55.org/apt-pkg/rpm/rpmlistparser.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/rpm/rpmlistparser.cc Tue Mar 12 17:18:31 2002
+@@ -80,7 +80,7 @@
+ char *p;
+
+ #ifdef DUPPACK
+- AllowedDupPackages = new slist<regex_t*>;
++ AllowedDupPackages = new list<regex_t*>;
+
+ const Configuration::Item *Top = _config->Tree("RPM::AllowedDupPkgs");
+
+@@ -108,7 +108,7 @@
+ AllowedDupPackages = NULL;//akk
+ #endif
+
+- HoldPackages = new slist<regex_t*>;
++ HoldPackages = new list<regex_t*>;
+
+ Top = _config->Tree("RPM::HoldPkgs");
+
+@@ -180,7 +180,7 @@
+
+ if (AllowedDupPackages != NULL)
+ {
+- for (slist<regex_t*>::iterator iter = AllowedDupPackages->begin();
++ for (list<regex_t*>::iterator iter = AllowedDupPackages->begin();
+ iter != AllowedDupPackages->end();
+ iter++)
+ {
+@@ -459,7 +459,7 @@
+ {
+ const char *str = Package().c_str();
+
+- for (slist<regex_t*>::iterator iter = HoldPackages->begin();
++ for (list<regex_t*>::iterator iter = HoldPackages->begin();
+ iter != HoldPackages->end();
+ iter++)
+ {
+diff -urN apt-0.3.19cnc55.org/apt-pkg/rpm/rpmlistparser.h apt-0.3.19cnc55/apt-pkg/rpm/rpmlistparser.h
+--- apt-0.3.19cnc55.org/apt-pkg/rpm/rpmlistparser.h Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/rpm/rpmlistparser.h Tue Mar 12 17:18:38 2002
+@@ -16,9 +16,10 @@
+ #include <apt-pkg/pkgcachegen.h>
+ #include <rpm/rpmlib.h>
+ #include <map>
+-#include <slist>
++#include <list>
+ #include <vector>
+ #include <regex.h>
++using namespace std;
+
+ class rpmListParser : public pkgCacheGenerator::ListParser
+ {
+@@ -33,10 +34,10 @@
+ map<string,string> *multiarchs;
+
+ map<string,long> *DupPackages;
+- slist<regex_t*> *AllowedDupPackages;
++ list<regex_t*> *AllowedDupPackages;
+ bool duplicated;
+
+- slist<regex_t*> *HoldPackages;
++ list<regex_t*> *HoldPackages;
+
+ bool parsing_hdlist;
+
+diff -urN apt-0.3.19cnc55.org/apt-pkg/rpm/rpmpm.cc apt-0.3.19cnc55/apt-pkg/rpm/rpmpm.cc
+--- apt-0.3.19cnc55.org/apt-pkg/rpm/rpmpm.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/rpm/rpmpm.cc Tue Mar 12 17:18:31 2002
+@@ -26,6 +26,8 @@
+ #include <stdio.h>
+
+ #include <string.h>
++#include <iostream>
++using namespace std;
+
+ #include <i18n.h>
+
+@@ -208,7 +210,7 @@
+
+ /* Feed the filename of each package that is pending install
+ into the pipe. */
+- if (Fd.Write(I->File.begin(),I->File.length()) == false ||
++ if (Fd.Write(I->File.data(),I->File.length()) == false ||
+ Fd.Write("\n",1) == false)
+ {
+ kill(Process,SIGINT);
+@@ -229,7 +231,7 @@
+
+ /*}}}*/
+
+-bool pkgRPMPM::ExecRPM(Operation operation, slist<char*> *files, bool nodeps)
++bool pkgRPMPM::ExecRPM(Operation operation, list<char*> *files, bool nodeps)
+ {
+ // Generate the argument list
+ const char *Args[10000];
+@@ -330,7 +332,7 @@
+ break;
+ }
+
+- for (slist<char*>::iterator i = files->begin();
++ for (list<char*>::iterator i = files->begin();
+ i != files->end() && n < sizeof(Args);
+ i++)
+ {
+@@ -422,9 +424,9 @@
+ }
+
+
+-bool pkgRPMPM::Process(slist<char*> *install,
+- slist<char*> *upgrade,
+- slist<char*> *uninstall)
++bool pkgRPMPM::Process(list<char*> *install,
++ list<char*> *upgrade,
++ list<char*> *uninstall)
+ {
+ if (_config->FindB("RPM::Check-Signatures", false) == true)
+ {
+@@ -469,9 +471,9 @@
+ if (RunScriptsWithPkgs("RPM::Pre-Install-Pkgs") == false)
+ return false;
+
+- slist<char*> *install = new slist<char*>;
+- slist<char*> *upgrade = new slist<char*>;
+- slist<char*> *uninstall = new slist<char*>;
++ list<char*> *install = new list<char*>;
++ list<char*> *upgrade = new list<char*>;
++ list<char*> *uninstall = new list<char*>;
+
+ for (vector<Item>::iterator I = List.begin(); I != List.end(); I++)
+ {
+diff -urN apt-0.3.19cnc55.org/apt-pkg/rpm/rpmpm.h apt-0.3.19cnc55/apt-pkg/rpm/rpmpm.h
+--- apt-0.3.19cnc55.org/apt-pkg/rpm/rpmpm.h Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/rpm/rpmpm.h Tue Mar 12 17:18:38 2002
+@@ -17,7 +17,7 @@
+
+ #include <apt-pkg/packagemanager.h>
+ #include <vector>
+-#include <slist>
++#include <list>
+
+
+ class pkgRPMPM : public pkgPackageManager
+@@ -50,10 +50,10 @@
+ virtual bool Configure(PkgIterator Pkg);
+ virtual bool Remove(PkgIterator Pkg,bool Purge = false);
+
+- bool ExecRPM(Operation operation, slist<char*> *files, bool nodeps);
+- bool Process(slist<char*> *install,
+- slist<char*> *upgrade,
+- slist<char*> *uninstall);
++ bool ExecRPM(Operation operation, list<char*> *files, bool nodeps);
++ bool Process(list<char*> *install,
++ list<char*> *upgrade,
++ list<char*> *uninstall);
+
+ virtual bool Go();
+ virtual void Reset();
+diff -urN apt-0.3.19cnc55.org/apt-pkg/rpm/rpmversion.cc apt-0.3.19cnc55/apt-pkg/rpm/rpmversion.cc
+--- apt-0.3.19cnc55.org/apt-pkg/rpm/rpmversion.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/rpm/rpmversion.cc Tue Mar 12 17:18:31 2002
+@@ -22,7 +22,7 @@
+
+ int RPMFactory::versionCompare(string A,string B)
+ {
+- return versionCompare(A.begin(),A.end(),B.begin(),B.end());
++ return versionCompare(A.data(),A.data()+A.size(),B.data(),B.data()+B.size());
+ }
+
+
+diff -urN apt-0.3.19cnc55.org/apt-pkg/sourcelist.cc apt-0.3.19cnc55/apt-pkg/sourcelist.cc
+--- apt-0.3.19cnc55.org/apt-pkg/sourcelist.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/sourcelist.cc Tue Mar 12 17:21:01 2002
+@@ -22,7 +22,7 @@
+
+ #include <i18n.h>
+
+-#include <fstream.h>
++#include <fstream>
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <errno.h>
+@@ -91,7 +91,7 @@
+ bool pkgSourceList::Read(string File)
+ {
+ // Open the stream for reading
+- ifstream F(File.c_str(),ios::in | ios::nocreate);
++ ifstream F(File.c_str(),ios::in);
+ if (!F != 0)
+ return _error->Errno("ifstream::ifstream","Opening %s",File.c_str());
+
+diff -urN apt-0.3.19cnc55.org/apt-pkg/sourcelist.h apt-0.3.19cnc55/apt-pkg/sourcelist.h
+--- apt-0.3.19cnc55.org/apt-pkg/sourcelist.h Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/sourcelist.h Tue Mar 12 17:20:20 2002
+@@ -23,7 +23,7 @@
+ #include <string>
+ #include <vector>
+ #include <map>
+-#include <iostream.h>
++#include <iostream>
+ #include <apt-pkg/pkgcache.h>
+
+ #ifdef __GNUG__
+diff -urN apt-0.3.19cnc55.org/apt-pkg/tagfile.cc apt-0.3.19cnc55/apt-pkg/tagfile.cc
+--- apt-0.3.19cnc55.org/apt-pkg/tagfile.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/tagfile.cc Tue Mar 12 17:18:31 2002
+@@ -23,6 +23,8 @@
+
+ #include <string>
+ #include <stdio.h>
++#include <iostream>
++using namespace std;
+ /*}}}*/
+
+ // TagFile::pkgTagFile - Constructor /*{{{*/
+diff -urN apt-0.3.19cnc55.org/apt-pkg/version.cc apt-0.3.19cnc55/apt-pkg/version.cc
+--- apt-0.3.19cnc55.org/apt-pkg/version.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/apt-pkg/version.cc Tue Mar 12 17:18:31 2002
+@@ -50,7 +50,7 @@
+
+ int SystemFactory::versionCompare(string A,string B)
+ {
+- return versionCompare(A.begin(),A.end(),B.begin(),B.end());
++ return versionCompare(A.data(),A.data()+A.size(),B.data(),B.data()+B.size());
+ }
+
+ /*}}}*/
+diff -urN apt-0.3.19cnc55.org/cmdline/apt-cache.cc apt-0.3.19cnc55/cmdline/apt-cache.cc
+--- apt-0.3.19cnc55.org/cmdline/apt-cache.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/cmdline/apt-cache.cc Tue Mar 12 17:24:41 2002
+@@ -38,7 +38,7 @@
+
+ #include <i18n.h>
+
+-#include <iostream.h>
++#include <iostream>
+ #include <unistd.h>
+ #include <errno.h>
+ #include <regex.h>
+diff -urN apt-0.3.19cnc55.org/cmdline/apt-cdrom.cc apt-0.3.19cnc55/cmdline/apt-cdrom.cc
+--- apt-0.3.19cnc55.org/cmdline/apt-cdrom.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/cmdline/apt-cdrom.cc Tue Mar 12 17:31:04 2002
+@@ -34,6 +34,7 @@
+ #include <unistd.h>
+ #include <stdio.h>
+ /*}}}*/
++using namespace std;
+
+ #define PACKAGES "pkglist"
+ #define SOURCES "srclist"
+@@ -514,7 +515,8 @@
+ string File = _config->FindFile("Dir::Etc::sourcelist");
+
+ // Open the stream for reading
+- ifstream F(File.c_str(),ios::in | ios::nocreate);
++ ifstream F((FileExists(File)?File.c_str():"/dev/null"),
++ ios::in );
+ if (!F != 0)
+ return _error->Errno("ifstream::ifstream","Opening %s",File.c_str());
+
+diff -urN apt-0.3.19cnc55.org/cmdline/apt-get.cc apt-0.3.19cnc55/cmdline/apt-get.cc
+--- apt-0.3.19cnc55.org/cmdline/apt-get.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/cmdline/apt-get.cc Tue Mar 12 17:28:13 2002
+@@ -54,7 +54,7 @@
+
+ #include "acqprogress.h"
+
+-#include <fstream.h>
++#include <fstream>
+ #include <termios.h>
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
+@@ -66,11 +66,11 @@
+ #include <regex.h>
+ #include <sys/wait.h>
+ /*}}}*/
++using namespace std;
+
+-
+-ostream c0out;
+-ostream c1out;
+-ostream c2out;
++ostream c0out(0);
++ostream c1out(0);
++ostream c2out(0);
+ ofstream devnull("/dev/null");
+ unsigned int ScreenWidth = 80;
+
+@@ -1202,7 +1202,7 @@
+ // Populate it with the source selection
+ for (I = List.begin(); I != List.end(); I++)
+ {
+- new pkgAcqIndex(&Fetcher,I);
++ new pkgAcqIndex(&Fetcher,&*I);
+ if (_error->PendingError() == true)
+ return false;
+ }
+diff -urN apt-0.3.19cnc55.org/cmdline/rpmindexcopy.cc apt-0.3.19cnc55/cmdline/rpmindexcopy.cc
+--- apt-0.3.19cnc55.org/cmdline/rpmindexcopy.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/cmdline/rpmindexcopy.cc Tue Mar 12 17:31:30 2002
+@@ -7,7 +7,7 @@
+ #include <apt-pkg/tagfile.h>
+
+
+-#include <iostream.h>
++#include <iostream>
+ #include <unistd.h>
+ #include <sys/stat.h>
+ #include <stdio.h>
+diff -urN apt-0.3.19cnc55.org/methods/cdrom.cc apt-0.3.19cnc55/methods/cdrom.cc
+--- apt-0.3.19cnc55.org/methods/cdrom.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/methods/cdrom.cc Tue Mar 12 17:18:31 2002
+@@ -17,6 +17,8 @@
+ #include <utime.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
++#include <iostream>
++using namespace std;
+ /*}}}*/
+
+ class CDROMMethod : public pkgAcqMethod
+diff -urN apt-0.3.19cnc55.org/methods/gpg.cc apt-0.3.19cnc55/methods/gpg.cc
+--- apt-0.3.19cnc55.org/methods/gpg.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/methods/gpg.cc Tue Mar 12 17:18:31 2002
+@@ -8,6 +8,7 @@
+ #include <utime.h>
+ #include <stdio.h>
+ #include <sys/wait.h>
++#include <ctype.h>
+
+
+ class GPGMethod : public pkgAcqMethod
+diff -urN apt-0.3.19cnc55.org/tools/cached_md5.cc apt-0.3.19cnc55/tools/cached_md5.cc
+--- apt-0.3.19cnc55.org/tools/cached_md5.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/tools/cached_md5.cc Tue Mar 12 17:40:00 2002
+@@ -38,10 +38,10 @@
+ #include <dirent.h>
+ #include <errno.h>
+ #include <fcntl.h>
++#include <string.h>
+ #include <rpm/rpmlib.h>
+ #include <rpm/misc.h>
+ #include <stdlib.h>
+-#include <string.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <assert.h>
+diff -urN apt-0.3.19cnc55.org/tools/cached_md5.h apt-0.3.19cnc55/tools/cached_md5.h
+--- apt-0.3.19cnc55.org/tools/cached_md5.h Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/tools/cached_md5.h Tue Mar 12 17:39:18 2002
+@@ -16,6 +16,8 @@
+ #include <string>
+ #include <map>
+
++using namespace std;
++
+ class CachedMD5
+ {
+ string filename;
+diff -urN apt-0.3.19cnc55.org/tools/genpkglist.cc apt-0.3.19cnc55/tools/genpkglist.cc
+--- apt-0.3.19cnc55.org/tools/genpkglist.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/tools/genpkglist.cc Tue Mar 12 17:38:11 2002
+@@ -74,6 +74,7 @@
+ #include <assert.h>
+
+ #include <map>
++#include <iostream>
+
+ #include <apt-pkg/error.h>
+ #include <apt-pkg/tagfile.h>
+@@ -82,7 +83,7 @@
+
+ #include "cached_md5.h"
+
+-
++using namespace std;
+
+ #define CRPMTAG_TIMESTAMP 1012345
+
+diff -urN apt-0.3.19cnc55.org/tools/gensrclist.cc apt-0.3.19cnc55/tools/gensrclist.cc
+--- apt-0.3.19cnc55.org/tools/gensrclist.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/tools/gensrclist.cc Tue Mar 12 17:49:06 2002
+@@ -47,8 +47,9 @@
+ #include <unistd.h>
+ #include <assert.h>
+
++#include <iostream>
+ #include <map>
+-#include <slist>
++#include <list>
+
+ #include <apt-pkg/error.h>
+ #include <apt-pkg/tagfile.h>
+@@ -56,7 +57,7 @@
+
+ #include "cached_md5.h"
+
+-
++using namespace std;
+
+
+
+@@ -105,7 +106,7 @@
+ }
+ }
+
+-bool readRPMTable(char *file, map<string, slist<char*>* > &table)
++bool readRPMTable(char *file, map<string, list<char*>* > &table)
+ {
+ FILE *indexf;
+ char buf[512];
+@@ -129,14 +130,14 @@
+ srpm = string(buf);
+
+ if (table.find(srpm) != table.end()) {
+- slist<char*> *list = table[srpm];
++ list<char*> *xlist = table[srpm];
+
+- list->push_front(strdup(f));
++ xlist->push_front(strdup(f));
+ } else {
+- slist<char*> *list = new slist<char*>;
++ list<char*> *xlist = new list<char*>;
+
+- list->push_front(strdup(f));
+- table[srpm] = list;
++ xlist->push_front(strdup(f));
++ table[srpm] = xlist;
+ }
+ }
+
+@@ -175,7 +176,7 @@
+ char *directory;
+ char *index;
+ CachedMD5 *md5cache;
+- map<string, slist<char*>* > rpmTable; // table that maps srpm -> generated rpm
++ map<string, list<char*>* > rpmTable; // table that maps srpm -> generated rpm
+ bool mapi = false;
+ bool progressBar = false;
+ bool flatStructure = false;
+@@ -329,24 +330,24 @@
+ foundInIndex = false;
+ {
+ int count = 0;
+- char **list = NULL;
+- slist<char*> *rpmlist = rpmTable[string(dirEntries[entry_cur]->d_name)];
++ char **xlist = NULL;
++ list<char*> *rpmlist = rpmTable[string(dirEntries[entry_cur]->d_name)];
+
+ if (rpmlist) {
+- list = new char *[rpmlist->size()];
++ xlist = new char *[rpmlist->size()];
+
+ foundInIndex = true;
+
+- for (slist<char*>::const_iterator i = rpmlist->begin();
++ for (list<char*>::const_iterator i = rpmlist->begin();
+ i != rpmlist->end();
+ i++) {
+- list[count++] = *i;
++ xlist[count++] = *i;
+ }
+ }
+
+ if (count) {
+ headerAddEntry(newHeader, CRPMTAG_BINARY,
+- RPM_STRING_ARRAY_TYPE, list, count);
++ RPM_STRING_ARRAY_TYPE, xlist, count);
+ }
+ }
+ if (foundInIndex || !mapi)
+diff -urN apt-0.3.19cnc55.org/tools/hdlist2pkglist.cc apt-0.3.19cnc55/tools/hdlist2pkglist.cc
+--- apt-0.3.19cnc55.org/tools/hdlist2pkglist.cc Tue Mar 12 18:04:10 2002
++++ apt-0.3.19cnc55/tools/hdlist2pkglist.cc Tue Mar 12 17:50:29 2002
+@@ -36,21 +36,24 @@
+ #include <dirent.h>
+ #include <errno.h>
+ #include <fcntl.h>
++#include <string.h>
+ #include <rpmlib.h>
+ #include <rpm/misc.h>
+ #include <stdlib.h>
+-#include <string.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+ #include <assert.h>
+
+ #include <map>
++#include <iostream>
+
+ #include <apt-pkg/error.h>
+ #include <apt-pkg/tagfile.h>
+ #include <apt-pkg/rpminit.h>
+
++using namespace std;
++
+ // from rpmlib
+ extern "C" {
+ extern int mdfile(const char *fn, unsigned char *digest);