diff options
author | Matthew Kennedy <mkennedy@gentoo.org> | 2002-11-03 17:38:25 +0000 |
---|---|---|
committer | Matthew Kennedy <mkennedy@gentoo.org> | 2002-11-03 17:38:25 +0000 |
commit | f54b08c8724a0cba079e79d9f401379e3d890c3d (patch) | |
tree | 3ddc1bd84c8c098de27b16b2a98e5108d3c92952 /net-p2p | |
parent | fix for gcc-3.2 (diff) | |
download | gentoo-2-f54b08c8724a0cba079e79d9f401379e3d890c3d.tar.gz gentoo-2-f54b08c8724a0cba079e79d9f401379e3d890c3d.tar.bz2 gentoo-2-f54b08c8724a0cba079e79d9f401379e3d890c3d.zip |
fix for gcc3.2
Diffstat (limited to 'net-p2p')
-rw-r--r-- | net-p2p/mutella/ChangeLog | 9 | ||||
-rw-r--r-- | net-p2p/mutella/files/mutella-gcc3-gentoo.patch | 547 | ||||
-rw-r--r-- | net-p2p/mutella/mutella-0.3.3.ebuild | 7 |
3 files changed, 561 insertions, 2 deletions
diff --git a/net-p2p/mutella/ChangeLog b/net-p2p/mutella/ChangeLog index 08c56f67ac8f..095487004bb1 100644 --- a/net-p2p/mutella/ChangeLog +++ b/net-p2p/mutella/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-p2p/mutella # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL -# $Header: /var/cvsroot/gentoo-x86/net-p2p/mutella/ChangeLog,v 1.4 2002/07/26 05:04:29 gerk Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-p2p/mutella/ChangeLog,v 1.5 2002/11/03 17:38:25 mkennedy Exp $ + +*mutella-0.3.3 (03 Nov 2002) + + 03 Nov 2002; Matthew Kennedy <mkennedy@gentoo.org> + files/mutella-gcc3-gentoo.patch, ChangeLog, mutella-0.3.3.ebuild : + + Fix for gcc3.2. *mutella-0.4 (09 Jul 2002) diff --git a/net-p2p/mutella/files/mutella-gcc3-gentoo.patch b/net-p2p/mutella/files/mutella-gcc3-gentoo.patch new file mode 100644 index 000000000000..01628aeb539f --- /dev/null +++ b/net-p2p/mutella/files/mutella-gcc3-gentoo.patch @@ -0,0 +1,547 @@ +diff -ur mutella-0.3.3/mutella/asyncfile.cpp mutella-0.3.3~/mutella/asyncfile.cpp +--- mutella-0.3.3/mutella/asyncfile.cpp 2002-01-24 07:54:47.000000000 -0600 ++++ mutella-0.3.3~/mutella/asyncfile.cpp 2002-11-03 10:37:54.000000000 -0600 +@@ -12,12 +12,13 @@ + #include "mutella.h" + #include "mthread.h" + #include <unistd.h> +-#include <iostream.h> ++#include <iostream> + #include <stdlib.h> + #include <sys/types.h> + #include <sys/stat.h> + #include <fcntl.h> + #include <errno.h> ++#include <algorithm> + + #include "tstring.h" + #include "asyncfile.h" +@@ -444,7 +445,7 @@ + // possibly get processed before the 'wakeAll' call. This results in a + // crash if the object get deleted in the request callback function + +-MAsyncFile::MAsyncFile(int mode /*=AFM_READWRITE*/, int nBufSize = 4096) //: m_mtxWait(true) //TODO: find a better way ++MAsyncFile::MAsyncFile(int mode /*=AFM_READWRITE*/, int nBufSize) //: m_mtxWait(true) //TODO: find a better way + { + + m_nMode = mode; +@@ -759,7 +760,7 @@ + return m_pData; + } + +-int MAsyncFile::Read(char* pBuffer, int nBytes, bool bOnlyCached = true, bool bBlock /*=false*/) // return number of bytes read or -1 ++int MAsyncFile::Read(char* pBuffer, int nBytes, bool bOnlyCached, bool bBlock /*=false*/) // return number of bytes read or -1 + { + if (m_mtxBuffer.locked()) + { +@@ -783,7 +784,7 @@ + int n = 0; + if (m_nPreReadBytes) + { +- n = min(nBytes, m_nPreReadBytes); ++ n = std::min(nBytes, m_nPreReadBytes); + memcpy(pBuffer, m_pData, n); + m_nPreReadBytes -= n; + if (m_nPreReadBytes) +@@ -879,7 +880,7 @@ + if (nBytesUsed > 0) + { + ASSERT(m_pRequest->type==AFR_NONE); +- m_nPreReadBytes -= min(m_nPreReadBytes, nBytesUsed); ++ m_nPreReadBytes -= std::min(m_nPreReadBytes, nBytesUsed); + if (m_nPreReadBytes) + m_pData += nBytesUsed; + else +@@ -920,7 +921,7 @@ + m_pBuffer = new char[m_nBufferSize]; + } + // copy +- nBytesSaved = min(nBytes, m_nBufferSize); ++ nBytesSaved = std::min(nBytes, m_nBufferSize); + memcpy(m_pBuffer, pBuffer, nBytes); + m_pRequest->buffer = m_pBuffer; + m_pRequest->size = nBytesSaved; +@@ -966,7 +967,7 @@ + m_pBuffer = new char[m_nBufferSize]; + } + // copy +- nBytesSaved = min(nBytes, m_nBufferSize); ++ nBytesSaved = std::min(nBytes, m_nBufferSize); + memcpy(m_pBuffer, pBuffer, nBytes); + m_pRequest->buffer = m_pBuffer; + m_pRequest->size = nBytesSaved; +diff -ur mutella-0.3.3/mutella/asyncsocket.h mutella-0.3.3~/mutella/asyncsocket.h +--- mutella-0.3.3/mutella/asyncsocket.h 2001-11-23 04:41:30.000000000 -0600 ++++ mutella-0.3.3~/mutella/asyncsocket.h 2002-11-03 10:16:28.000000000 -0600 +@@ -159,4 +159,7 @@ + }; + + +-#endif //__MASYCNSOCKET_H_INCLUDED__ +\ No newline at end of file ++#endif //__MASYCNSOCKET_H_INCLUDED__ ++ ++ ++ +diff -ur mutella-0.3.3/mutella/byteorder.h mutella-0.3.3~/mutella/byteorder.h +--- mutella-0.3.3/mutella/byteorder.h 2001-11-23 04:41:36.000000000 -0600 ++++ mutella-0.3.3~/mutella/byteorder.h 2002-11-03 10:16:33.000000000 -0600 +@@ -103,4 +103,7 @@ + + extern void BitReorder(unsigned char* pBuffer, int nSize, int nElementSize, bool bBits, bool bBytes); + +-#endif //_BYTEORDER_H_INCLUDED_ +\ No newline at end of file ++#endif //_BYTEORDER_H_INCLUDED_ ++ ++ ++ +diff -ur mutella-0.3.3/mutella/common.h mutella-0.3.3~/mutella/common.h +--- mutella-0.3.3/mutella/common.h 2002-01-18 14:36:22.000000000 -0600 ++++ mutella-0.3.3~/mutella/common.h 2002-11-03 10:16:31.000000000 -0600 +@@ -364,4 +364,7 @@ + bool m_bFull; + }; + +-#endif +\ No newline at end of file ++#endif ++ ++ ++ +diff -ur mutella-0.3.3/mutella/controller.cpp mutella-0.3.3~/mutella/controller.cpp +--- mutella-0.3.3/mutella/controller.cpp 2002-01-24 09:47:13.000000000 -0600 ++++ mutella-0.3.3~/mutella/controller.cpp 2002-11-03 10:44:28.000000000 -0600 +@@ -24,6 +24,7 @@ + #include "asyncfile.h" + #include "event.h" + ++#include <iostream> + + class MControllerThread: public MThread + { +@@ -274,7 +275,7 @@ + DirEntryVec partials; + if (!ScanDir(partials, ExpandPath(partDir), "*.[[*]]")) + { +- cerr << "LoadPartials: error scanning the dir " << partDir << endl; ++ std::cerr << "LoadPartials: error scanning the dir " << partDir << std::endl; + return; + } + if (!partials.size()) +diff -ur mutella-0.3.3/mutella/conversions.h mutella-0.3.3~/mutella/conversions.h +--- mutella-0.3.3/mutella/conversions.h 2001-11-23 05:04:21.000000000 -0600 ++++ mutella-0.3.3~/mutella/conversions.h 2002-11-03 10:16:43.000000000 -0600 +@@ -32,4 +32,4 @@ +
+ CString GetMapColor(int Hops);
+
+-#endif +\ No newline at end of file ++#endif
+diff -ur mutella-0.3.3/mutella/defines.h mutella-0.3.3~/mutella/defines.h +--- mutella-0.3.3/mutella/defines.h 2001-12-12 03:33:03.000000000 -0600 ++++ mutella-0.3.3~/mutella/defines.h 2002-11-03 10:06:18.000000000 -0600 +@@ -66,4 +66,4 @@ + + #endif //_DEBUG + +-#endif //__defines_h_included__ +\ No newline at end of file ++#endif //__defines_h_included__ +diff -ur mutella-0.3.3/mutella/dir.h mutella-0.3.3~/mutella/dir.h +--- mutella-0.3.3/mutella/dir.h 2001-11-23 04:43:35.000000000 -0600 ++++ mutella-0.3.3~/mutella/dir.h 2002-11-03 10:39:12.000000000 -0600 +@@ -9,6 +9,8 @@ + #ifndef _DIR_H_INCLUDED_ + #define _DIR_H_INCLUDED_ + ++#include <vector> ++ + struct DirEntry { + enum DirEntryType{ + notdef = 0x0000, +@@ -68,7 +70,7 @@ + SORT_BYCTIME = 0x0005 + }; + +-typedef vector<DirEntry> DirEntryVec; ++typedef std::vector<DirEntry> DirEntryVec; + + bool ScanDir( DirEntryVec& result, + const CString &path, +diff -ur mutella-0.3.3/mutella/event.cpp mutella-0.3.3~/mutella/event.cpp +--- mutella-0.3.3/mutella/event.cpp 2002-01-18 06:57:48.000000000 -0600 ++++ mutella-0.3.3~/mutella/event.cpp 2002-11-03 10:16:12.000000000 -0600 +@@ -21,7 +21,7 @@ + } + + // simple string event +-MStringEvent::MStringEvent(int type, int severity, const CString& value, DWORD ID = 0) : ++MStringEvent::MStringEvent(int type, int severity, const CString& value, DWORD ID) : + TSimpleEvent<CString>(type,severity,value, ID) + { + } +@@ -118,7 +118,7 @@ + + } + +-bool MAsyncEventReceiver::Poll(u_long time = ULONG_MAX) ++bool MAsyncEventReceiver::Poll(u_long time) + { + MLock lock(m_mutex); + if (m_queue.size()) +diff -ur mutella-0.3.3/mutella/gnudirector.cpp mutella-0.3.3~/mutella/gnudirector.cpp +--- mutella-0.3.3/mutella/gnudirector.cpp 2002-01-24 09:40:05.000000000 -0600 ++++ mutella-0.3.3~/mutella/gnudirector.cpp 2002-11-03 11:00:10.000000000 -0600 +@@ -1361,7 +1361,7 @@ + if(pSock->m_nSecsAlive > 15 || pSock->m_bDestroy) + { + delete pSock; +- m_SockList.erase(&m_SockList[i]); ++ m_SockList.erase(m_SockList.begin() + i); + i--; + } + else +@@ -1425,7 +1425,7 @@ + if(pUp->m_nStatus == TRANSFER_CLOSED || pUp->m_nStatus == TRANSFER_COMPLETED) + { + delete pUp; +- m_UploadList.erase(&m_UploadList[i]); ++ m_UploadList.erase(m_UploadList.begin() + i); + i--; + } + else +@@ -1483,7 +1483,7 @@ + { + // remove "autoget" search + // m_listmutex is locked here +- for (vector<MGnuSearch*>::iterator is = m_SearchList.begin(); is != m_SearchList.end(); ++is) ++ for (std::vector<MGnuSearch*>::iterator is = m_SearchList.begin(); is != m_SearchList.end(); ++is) + { + if ( (*is)->IsAutomatic() && pDown->m_dwSearchID == (*is)->m_dwID ) + { +@@ -1494,7 +1494,7 @@ + } + } + // +- m_DownloadList.erase(&m_DownloadList[i]); ++ m_DownloadList.erase(m_DownloadList.begin() + i); + i--; + delete pDown; + } +@@ -1586,7 +1586,7 @@ + float BandwidthLimit = -1; + + if(m_pPrefs->m_dBandwidthTotal >= 0 && m_pPrefs->m_dBandwidthConnects >= 0) +- BandwidthLimit = min(m_pPrefs->m_dBandwidthTotal,m_pPrefs->m_dBandwidthConnects); ++ BandwidthLimit = std::min(m_pPrefs->m_dBandwidthTotal,m_pPrefs->m_dBandwidthConnects); + else if(m_pPrefs->m_dBandwidthTotal >= 0) + BandwidthLimit = m_pPrefs->m_dBandwidthTotal; + else if(m_pPrefs->m_dBandwidthConnects >= 0) +diff -ur mutella-0.3.3/mutella/gnudownload.cpp mutella-0.3.3~/mutella/gnudownload.cpp +--- mutella-0.3.3/mutella/gnudownload.cpp 2002-01-24 09:42:55.000000000 -0600 ++++ mutella-0.3.3~/mutella/gnudownload.cpp 2002-11-03 10:58:08.000000000 -0600 +@@ -34,7 +34,7 @@ + // service: we need this set for thread-safe callbacks + + static MMutex s_mutexDownloadSet(true); // recursive to enable 'delete this' from callbacks +-static set<MGnuDownload*> s_setDownloads; ++static std::set<MGnuDownload*> s_setDownloads; + // + static inline void RegisterDownload(MGnuDownload* p) + { +@@ -788,7 +788,7 @@ + m_dwSecBytes += nSize; + if(m_dwResumeStart) + { +- int VerSize = min(nSize, (int)(m_dwBytesCompleted-m_dwResumeStart-m_nVerifyPos)); ++ int VerSize = std::min(nSize, (int)(m_dwBytesCompleted-m_dwResumeStart-m_nVerifyPos)); + ASSERT(m_nVerifyPos>=0); + ASSERT(VerSize <= 4096 - m_nVerifyPos); + ASSERT(m_nVerifyPos<4096); +@@ -1091,7 +1091,7 @@ + if (m_BadResults[j].ChangeTime != SR.ChangeTime) + { + // it is not gona be bad anymore +- m_BadResults.erase(&m_BadResults[j]); ++ m_BadResults.erase(m_BadResults.begin() + j); + break; + } + else +@@ -1157,7 +1157,7 @@ + // remove this result + // and put it to the BAD list + m_BadResults.push_back(m_Queue[m_nQueuePos]); +- m_Queue.erase(&m_Queue[m_nQueuePos]); ++ m_Queue.erase(m_Queue.begin() + m_nQueuePos); + // note that counter should not be incremented + m_nQueuePos = m_nQueuePos % m_Queue.size(); + } +diff -ur mutella-0.3.3/mutella/gnunode.cpp mutella-0.3.3~/mutella/gnunode.cpp +--- mutella-0.3.3/mutella/gnunode.cpp 2002-01-20 15:11:25.000000000 -0600 ++++ mutella-0.3.3~/mutella/gnunode.cpp 2002-11-03 10:46:35.000000000 -0600 +@@ -35,6 +35,8 @@ + static char THIS_FILE[] = __FILE__; + #endif + ++#include <algorithm> ++ + ///////////////////////////////////////////////////////////////////////////// + // MGnuNode + +@@ -128,7 +130,7 @@ + delete [] m_pExtraBuffer; + } + +-int MGnuNode::Send(const void* lpBuf, int nBufLen, int nFlags = 0) ++int MGnuNode::Send(const void* lpBuf, int nBufLen, int nFlags) + { + ASSERT(nFlags == 0); + MLock lock(m_sendQueueMutex); +@@ -242,7 +244,7 @@ + ASSERT(m_dwExtraLength>0); + ASSERT(m_dwExtraLength<=65536); + //memcpy(m_pReceiveBuffer, m_pExtra, m_dwExtraLength); +- swap(m_pReceiveBuffer, m_pExtraBuffer); ++ std::swap(m_pReceiveBuffer, m_pExtraBuffer); + dwOffset = m_dwExtraLength; + m_dwExtraLength = 0; + } +@@ -277,7 +279,7 @@ + } + else + { +- swap(m_pReceiveBuffer, m_pExtraBuffer); ++ std::swap(m_pReceiveBuffer, m_pExtraBuffer); + m_dwExtraLength = dwBuffLength; + } + } +@@ -290,7 +292,7 @@ + if(65536 > m_dwExtraLength) + { + if (dwBuffLength == m_dwExtraLength && pDataToSplit == m_pReceiveBuffer) +- swap(m_pReceiveBuffer, m_pExtraBuffer); ++ std::swap(m_pReceiveBuffer, m_pExtraBuffer); + else + { + ASSERT(dwBuffLength<=65536); +diff -ur mutella-0.3.3/mutella/gnusearch.cpp mutella-0.3.3~/mutella/gnusearch.cpp +--- mutella-0.3.3/mutella/gnusearch.cpp 2002-01-24 09:26:14.000000000 -0600 ++++ mutella-0.3.3~/mutella/gnusearch.cpp 2002-11-03 10:43:12.000000000 -0600 +@@ -17,6 +17,8 @@ + #include "gnudownload.h" + #include "packet.h" + ++#include <algorithm> ++ + int ResultGroup::SortBy = 0; + bool ResultGroup::Reverse = true; + +@@ -76,7 +78,7 @@ + } + if (sQuery.length()<4) + return; +- int nSearchStlLen = min(sQuery.length(), 256-25-1); ++ int nSearchStlLen = std::min(sQuery.length(), 256-25-1); + memcpy(m_Packet + 25, sQuery.c_str(), nSearchStlLen); //TODO: check bounds!!! + m_Packet[25 + nSearchStlLen] = '\0'; //FIXED! out of bounds mem-write! + m_nPacketLength = 25 + nSearchStlLen + 1; +diff -ur mutella-0.3.3/mutella/gnusearch.h mutella-0.3.3~/mutella/gnusearch.h +--- mutella-0.3.3/mutella/gnusearch.h 2002-01-24 09:26:26.000000000 -0600 ++++ mutella-0.3.3~/mutella/gnusearch.h 2002-11-03 10:40:55.000000000 -0600 +@@ -76,8 +76,8 @@ + protected: + // search kitchen + char* m_szSearch; +- vector<char*> m_PlusWords; +- vector<char*> m_MinusWords; ++ std::vector<char*> m_PlusWords; ++ std::vector<char*> m_MinusWords; + // packet + BYTE* m_Packet; + int m_nPacketLength; +diff -ur mutella-0.3.3/mutella/gnuupload.cpp mutella-0.3.3~/mutella/gnuupload.cpp +--- mutella-0.3.3/mutella/gnuupload.cpp 2002-01-19 16:12:08.000000000 -0600 ++++ mutella-0.3.3~/mutella/gnuupload.cpp 2002-11-03 10:44:54.000000000 -0600 +@@ -34,7 +34,7 @@ + // service: we need this set for thread-safe callbacks + + static MMutex s_mutexUploadSet(true); // recursive to enable 'delete this' from callbacks +-static set<MGnuUpload*> s_setUploads; ++static std::set<MGnuUpload*> s_setUploads; + // + static inline void RegisterUpload(MGnuUpload* p) + { +diff -ur mutella-0.3.3/mutella/mprintf.cpp mutella-0.3.3~/mutella/mprintf.cpp +--- mutella-0.3.3/mutella/mprintf.cpp 2002-01-23 03:40:06.000000000 -0600 ++++ mutella-0.3.3~/mutella/mprintf.cpp 2002-11-03 10:17:12.000000000 -0600 +@@ -16,7 +16,7 @@ + #include "term_help.h" + #include "ansicolor.h" + +-MPrintf::MPrintf(int nCPL = -1) ++MPrintf::MPrintf(int nCPL) + { + m_nCPL = nCPL; + m_nCaret = 0; +@@ -147,7 +147,7 @@ + + ///////////////////////////////////////////////////////////////////////////// + +-MPrintfMore::MPrintfMore(int nCPL = -1, int nLPP = -1) : MPrintf(nCPL) ++MPrintfMore::MPrintfMore(int nCPL, int nLPP) : MPrintf(nCPL) + { + m_nLPP = nLPP; + m_nLines = 0; +diff -ur mutella-0.3.3/mutella/mthread_unix.cpp mutella-0.3.3~/mutella/mthread_unix.cpp +--- mutella-0.3.3/mutella/mthread_unix.cpp 2002-01-18 15:05:50.000000000 -0600 ++++ mutella-0.3.3~/mutella/mthread_unix.cpp 2002-11-03 10:43:45.000000000 -0600 +@@ -574,7 +574,7 @@ + return d->thread_done.wait(time); + } + +-bool MThread::wait( MMutex* mutex, unsigned long time = ULONG_MAX ) ++bool MThread::wait( MMutex* mutex, unsigned long time) + { + if (d->finished || ! d->running) + return TRUE; +diff -ur mutella-0.3.3/mutella/mui.cpp mutella-0.3.3~/mutella/mui.cpp +--- mutella-0.3.3/mutella/mui.cpp 2002-01-24 10:06:22.000000000 -0600 ++++ mutella-0.3.3~/mutella/mui.cpp 2002-11-03 10:42:31.000000000 -0600 +@@ -9,7 +9,7 @@ + #include "config.h" + #endif + +-#include <iostream.h> ++#include <iostream> + #include <stdlib.h> + #include <stdio.h> + #include <unistd.h> +@@ -198,7 +198,7 @@ + int m_nDummy1; + bool m_bContinue; + int m_nDummy2; +- queue<CString> m_command_queue; ++ std::queue<CString> m_command_queue; + // paged terminal output + MPrintfColor m_more; + // couple of properties +diff -ur mutella-0.3.3/mutella/mutella.h mutella-0.3.3~/mutella/mutella.h +--- mutella-0.3.3/mutella/mutella.h 2002-01-20 15:01:33.000000000 -0600 ++++ mutella-0.3.3~/mutella/mutella.h 2002-11-03 10:12:45.000000000 -0600 +@@ -13,7 +13,7 @@ + #include <vector> + #include <string> + #include <list> +-#include <slist> ++#include <ext/slist> + #include <deque> + #include <queue> + #include <set> +@@ -148,4 +148,4 @@ + #include "packet.h" + #include "conversions.h" + +-#endif //__mutella_h_included__ +\ No newline at end of file ++#endif //__mutella_h_included__ +diff -ur mutella-0.3.3/mutella/property.cpp mutella-0.3.3~/mutella/property.cpp +--- mutella-0.3.3/mutella/property.cpp 2002-01-18 13:36:15.000000000 -0600 ++++ mutella-0.3.3~/mutella/property.cpp 2002-11-03 10:42:08.000000000 -0600 +@@ -134,7 +134,7 @@ + if (!inifile.LoadFile(path.c_str())) + return false; + bool bOK = true; +- map<CString, MProperty*>map_copy = m_props; ++ std::map<CString, MProperty*>map_copy = m_props; + for (sec_iterator its = sec_begin();its!=sec_end();its++) + { + MPropertySection* pS = its->second; +@@ -163,7 +163,7 @@ + MIniFile inifile(INI_FxALLOWxCREATE); + inifile.LoadFile(path.c_str()); + // +- map<CString, MProperty*>map_copy = m_props; ++ std::map<CString, MProperty*>map_copy = m_props; + for (sec_iterator its = sec_begin();its!=sec_end();its++) + { + MPropertySection* pS = its->second; +@@ -196,7 +196,7 @@ + { + int nCountAdded = 0; + std::queue<CString> toErase; +- map<CString, MProperty*>map_copy = pPC->m_props; ++ std::map<CString, MProperty*>map_copy = pPC->m_props; + for (sec_iterator its = pPC->sec_begin();its!=pPC->sec_end();its++) + { + MPropertySection* pS = its->second; +diff -ur mutella-0.3.3/mutella/property.h mutella-0.3.3~/mutella/property.h +--- mutella-0.3.3/mutella/property.h 2002-01-18 13:41:07.000000000 -0600 ++++ mutella-0.3.3~/mutella/property.h 2002-11-03 10:41:14.000000000 -0600 +@@ -168,21 +168,21 @@ + class MPropertySection{ + friend class MPropertyContainer; + public: +- typedef map<CString, MProperty*>::iterator prop_iterator; ++ typedef std::map<CString, MProperty*>::iterator prop_iterator; + // + static inline MProperty* GetProperty(const prop_iterator& it){return it->second;} + static inline LPCSTR GetPropertyName(const prop_iterator& it){return it->first.c_str();} + inline prop_iterator begin(){return m_props.begin();} + inline prop_iterator end(){return m_props.end();} + protected: +- map<CString, MProperty*> m_props; ++ std::map<CString, MProperty*> m_props; + CString m_sName; + }; + + class MPropertyContainer { + public: +- typedef map<CString, MProperty*>::iterator prop_iterator; +- typedef map<CString, MPropertySection*>::iterator sec_iterator; ++ typedef std::map<CString, MProperty*>::iterator prop_iterator; ++ typedef std::map<CString, MPropertySection*>::iterator sec_iterator; + typedef prop_iterator iterator; + + MPropertyContainer(); +@@ -226,8 +226,8 @@ + bool Read(LPCSTR szName); + bool Write(LPCSTR szName); + protected: +- map<CString, MProperty*> m_props; +- map<CString, MPropertySection*> m_secs; ++ std::map<CString, MProperty*> m_props; ++ std::map<CString, MPropertySection*> m_secs; + MPropertySection* m_pCurSec; + }; + +diff -ur mutella-0.3.3/mutella/tstring.h mutella-0.3.3~/mutella/tstring.h +--- mutella-0.3.3/mutella/tstring.h 2002-01-13 09:52:12.000000000 -0600 ++++ mutella-0.3.3~/mutella/tstring.h 2002-11-03 10:15:18.000000000 -0600 +@@ -396,8 +396,8 @@ + friend TString<T> operator+ <>(typename TString<T>::LPCT pszLhs, const TString<T>& rhs); + friend TString<T> operator+ <>(const TString<T>& lhs, T cRhs); + friend TString<T> operator+ <>(T cLhs, const TString<T>& rhs); +- friend ostream& operator<< <>(ostream& os, const TString<T>& st); +- friend istream& operator>> <>(istream& is, const TString<T>& st); ++ friend std::ostream& operator<< <>(std::ostream& os, const TString<T>& st); ++ friend std::istream& operator>> <>(std::istream& is, const TString<T>& st); + }; + + template<class T> +@@ -534,12 +534,12 @@ + } + + template<class T> +-ostream& operator<<(ostream& os, const TString<T>& st) { ++std::ostream& operator<<(std::ostream& os, const TString<T>& st) { + return os << st.m_pBuffer; + } + + template<class T> +-istream& operator>>(istream& is, const TString<T>& st){ ++std::istream& operator>>(std::istream& is, const TString<T>& st){ + ASSERT(0);// not implemented properly + return is >> st.m_pBuffer; + } diff --git a/net-p2p/mutella/mutella-0.3.3.ebuild b/net-p2p/mutella/mutella-0.3.3.ebuild index 054533303e68..f3a6e8e9bfcb 100644 --- a/net-p2p/mutella/mutella-0.3.3.ebuild +++ b/net-p2p/mutella/mutella-0.3.3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-p2p/mutella/mutella-0.3.3.ebuild,v 1.4 2002/07/26 05:04:29 gerk Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-p2p/mutella/mutella-0.3.3.ebuild,v 1.5 2002/11/03 17:38:25 mkennedy Exp $ S=${WORKDIR}/${P} DESCRIPTION="Text-mode gnutella client." @@ -13,6 +13,11 @@ KEYWORDS="x86 ppc" DEPEND="virtual/glibc sys-libs/readline" RDEPEND=${DEPEND} +src_unpack() { + unpack ${A} + cd ${S} && patch -p1 <${FILESDIR}/mutella-gcc3-gentoo.patch || die +} + src_compile() { ./configure \ --host=${CHOST} \ |