From 12a89db5ca36fc53f735605d0eb335a1c034d27e Mon Sep 17 00:00:00 2001 From: joerg Date: Sun, 11 Dec 2005 22:03:39 +0000 Subject: Fixes for GCC 3.4+: add explicit this-> when calling inherited member functions, add an isprint using a reference(!) to an unsigned character to work with normal pointers instead. *sigh* --- audio/mp3check/distinfo | 6 ++++-- audio/mp3check/patches/patch-ae | 23 +++++++++++++++++++++-- audio/mp3check/patches/patch-af | 13 +++++++++++++ audio/mp3check/patches/patch-ag | 22 ++++++++++++++++++++++ 4 files changed, 60 insertions(+), 4 deletions(-) create mode 100644 audio/mp3check/patches/patch-af create mode 100644 audio/mp3check/patches/patch-ag (limited to 'audio/mp3check') diff --git a/audio/mp3check/distinfo b/audio/mp3check/distinfo index b6819dd9790..72ce9b51e30 100644 --- a/audio/mp3check/distinfo +++ b/audio/mp3check/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.5 2005/02/23 20:39:49 agc Exp $ +$NetBSD: distinfo,v 1.6 2005/12/11 22:03:39 joerg Exp $ SHA1 (mp3check-0.8.0.tar.gz) = 3f75bbb59a86dc234acba8db2537cc2f86e52896 RMD160 (mp3check-0.8.0.tar.gz) = c10fb30c1f0679322e80f92798c117f77e1c6755 @@ -7,4 +7,6 @@ SHA1 (patch-aa) = df47e94ed8a765d58da8fcabaf407df8931843e3 SHA1 (patch-ab) = 86e1da01f1407f748dbd2fa8436e2d2cdaaf3f4d SHA1 (patch-ac) = 9befdd0ac3e96014a389c00180768b709e1ce3a4 SHA1 (patch-ad) = ca416a54a1b751f7587f977288a99b5da061a12a -SHA1 (patch-ae) = 5048c7e76efc936d5bfac0e5aad51638022d8c88 +SHA1 (patch-ae) = 02494d79eaf448d9b96f80e29ac22bcac52527c9 +SHA1 (patch-af) = 3b6c2f96b6f372553bdbf8332184c78fe20b2706 +SHA1 (patch-ag) = b29c5b8be30e0f971680381586e80650b3791547 diff --git a/audio/mp3check/patches/patch-ae b/audio/mp3check/patches/patch-ae index c1543305b3c..1da59af9742 100644 --- a/audio/mp3check/patches/patch-ae +++ b/audio/mp3check/patches/patch-ae @@ -1,6 +1,6 @@ -$NetBSD: patch-ae,v 1.1 2003/02/16 23:08:26 abs Exp $ +$NetBSD: patch-ae,v 1.2 2005/12/11 22:03:39 joerg Exp $ ---- tstring.cc.orig Fri Feb 14 13:11:53 2003 +--- tstring.cc.orig 2003-01-27 21:21:17.000000000 +0000 +++ tstring.cc @@ -27,6 +27,7 @@ #include @@ -10,3 +10,22 @@ $NetBSD: patch-ae,v 1.1 2003/02/16 23:08:26 abs Exp $ #include "tstring.h" #include "texception.h" +@@ -714,12 +715,12 @@ void tstring::truncate(size_t max) { + + void tstring::replaceUnprintable(bool only_ascii) { + for(size_t i = 0; i < rep->len; i++) { +- unsigned char& c = (unsigned char)(*rep)[i]; +- if(!isprint(c)) { +- if(c < ' ') { +- c = '!'; +- } else if(only_ascii || (c < 0xa0)) { +- c = '?'; ++ unsigned char *c = (unsigned char*)&(*rep)[i]; ++ if(!isprint(*c)) { ++ if(*c < ' ') { ++ *c = '!'; ++ } else if(only_ascii || (*c < 0xa0)) { ++ *c = '?'; + } + } + } diff --git a/audio/mp3check/patches/patch-af b/audio/mp3check/patches/patch-af new file mode 100644 index 00000000000..261056f00cf --- /dev/null +++ b/audio/mp3check/patches/patch-af @@ -0,0 +1,13 @@ +$NetBSD: patch-af,v 1.1 2005/12/11 22:03:39 joerg Exp $ + +--- tmap.h.orig 2005-12-11 21:46:52.000000000 +0000 ++++ tmap.h +@@ -54,7 +54,7 @@ class tmap: public tmap_base { + // new functionality + + /// return whether an element with key is contained or not +- bool contains(const K& key) const { return find(key) != end(); } ++ bool contains(const K& key) const { return find(key) != this->end(); } + /// access element read only (const) + // g++ 2.95.2 does not allow this: + // const T& operator[](const K& key) const { const_iterator i = find(key); if(i != end()) return i->second; else throw TNotFoundException(); } // throw(TNotFoundException) diff --git a/audio/mp3check/patches/patch-ag b/audio/mp3check/patches/patch-ag new file mode 100644 index 00000000000..bfe5c8f4207 --- /dev/null +++ b/audio/mp3check/patches/patch-ag @@ -0,0 +1,22 @@ +$NetBSD: patch-ag,v 1.1 2005/12/11 22:03:39 joerg Exp $ + +--- tvector.h.orig 2005-12-11 21:47:29.000000000 +0000 ++++ tvector.h +@@ -60,13 +60,13 @@ class tvector: public tvector_base { + /// append an element to the end + const tvector& operator += (const T& a) { push_back(a); return *this; } + /// append another tvector to the end +- const tvector& operator += (const tvector& a) { insert(end(), a.begin(), a.end()); return *this; } ++ const tvector& operator += (const tvector& a) { insert(tvector_base::end(), a.begin(), a.end()); return *this; } + /// direct read only access, safe +- const T& operator[](size_t i) const { if(i < size()) return tvector_base::operator[](i); else throw TZeroBasedIndexOutOfRangeException(i, size()); } // throw(TZeroBasedIndexOutOfRangeException); ++ const T& operator[](size_t i) const { if(i < this->size()) return tvector_base::operator[](i); else throw TZeroBasedIndexOutOfRangeException(i, this->size()); } // throw(TZeroBasedIndexOutOfRangeException); + /// direct read/write access, automatically create new elements +- T& operator[](size_t i) { if(i >= size()) operator+=(tvector(i - size() + 1)); return tvector_base::operator[](i); } ++ T& operator[](size_t i) { if(i >= this->size()) operator+=(tvector(i - this->size() + 1)); return tvector_base::operator[](i); } + /// clear vector +- void clear() { erase(begin(), end()); } ++ void clear() { erase(this->begin(), this->end()); } + }; + + -- cgit v1.2.3