Date: Mon, 3 Jun 2013 02:51:01 +0900 From: KATO Tsuguru <tkato432@yahoo.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/179225: graphics/qslim: Fix build with clang Message-ID: <20130603025101.585a66e16a461c03a2c16fb2@yahoo.com> Resent-Message-ID: <201306021810.r52IA7tf099581@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 179225 >Category: ports >Synopsis: graphics/qslim: Fix build with clang >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Jun 02 18:10:07 UTC 2013 >Closed-Date: >Last-Modified: >Originator: KATO Tsuguru >Release: FreeBSD 8.4-RELEASE i386 >Organization: >Environment: >Description: - Fix build with clang New file: files/patch-mixkit__src__MxDynBlock.h files/patch-mixkit__src__MxStack.h files/patch-tools__qslim__qslim.cxx >How-To-Repeat: >Fix: diff -urN /usr/ports/graphics/qslim/files/patch-mixkit__src__MxDynBlock.h graphics/qslim/files/patch-mixkit__src__MxDynBlock.h --- /usr/ports/graphics/qslim/files/patch-mixkit__src__MxDynBlock.h 1970-01-01 09:00:00.000000000 +0900 +++ graphics/qslim/files/patch-mixkit__src__MxDynBlock.h 2013-06-03 00:00:00.000000000 +0900 @@ -0,0 +1,29 @@ +--- mixkit/src/MxDynBlock.h.orig ++++ mixkit/src/MxDynBlock.h +@@ -35,13 +35,13 @@ + + void room_for(int len) + { +- if( length()<len ) resize(len); ++ if( length()<len ) this->resize(len); + fill = len; + } + + T& add() + { +- if( length()==total_space() ) resize(total_space() * 2); ++ if( length()==total_space() ) this->resize(total_space() * 2); + fill++; + return last(); + } +@@ -62,8 +62,8 @@ + // + int size() const { return length(); } + +- typename MxBlock<T>::iterator end() { return begin()+size(); } +- typename MxBlock<T>::const_iterator end() const { return begin()+size(); } ++ typename MxBlock<T>::iterator end() { return this->begin()+size(); } ++ typename MxBlock<T>::const_iterator end() const { return this->begin()+size(); } + + void push_back(const T& t) { add(t); } + }; diff -urN /usr/ports/graphics/qslim/files/patch-mixkit__src__MxStack.h graphics/qslim/files/patch-mixkit__src__MxStack.h --- /usr/ports/graphics/qslim/files/patch-mixkit__src__MxStack.h 1970-01-01 09:00:00.000000000 +0900 +++ graphics/qslim/files/patch-mixkit__src__MxStack.h 2013-06-03 00:00:00.000000000 +0900 @@ -0,0 +1,31 @@ +--- mixkit/src/MxStack.h.orig ++++ mixkit/src/MxStack.h +@@ -26,14 +26,14 @@ + MxStack(const T& val, unsigned int n) : MxDynBlock<T>(n) + { push(val); } + +- T& top() { return last(); } +- const T& top() const { return last(); } ++ T& top() { return this->last(); } ++ const T& top() const { return this->last(); } + +- bool is_empty() { return length()==0; } ++ bool is_empty() { return this->length()==0; } + +- T& pop() { return drop(); } ++ T& pop() { return this->drop(); } + +- void push(const T& val) { add(val); } ++ void push(const T& val) { this->add(val); } + // + // NOTE: In this code, it is *crucial* that we do the add() and + // assignment in separate steps. The obvious alternative +@@ -41,7 +41,7 @@ + // broken! The top() will grab a pointer into the block, + // but the add() may reallocate the block before doing the + // assignment. Thus, the pointer will become invalid. +- void push() { add(); top() = (*this)[length()-2]; } ++ void push() { this->add(); top() = (*this)[this->length()-2]; } + }; + + // MXSTACK_INCLUDED diff -urN /usr/ports/graphics/qslim/files/patch-tools-qslim_qvis.cxx graphics/qslim/files/patch-tools-qslim_qvis.cxx --- /usr/ports/graphics/qslim/files/patch-tools-qslim_qvis.cxx 2012-11-08 09:45:12.000000000 +0900 +++ graphics/qslim/files/patch-tools-qslim_qvis.cxx 2013-06-03 00:00:00.000000000 +0900 @@ -9,3 +9,12 @@ #include <FL/filename.H> #include <FL/filename.H> #include <FL/Fl_Slider.H> +@@ -228,7 +228,7 @@ + // Main application routine + // + +-main(int argc, char **argv) ++int main(int argc, char **argv) + { + // Change default values for application variables in GUI version + will_record_history = true; diff -urN /usr/ports/graphics/qslim/files/patch-tools__qslim__qslim.cxx graphics/qslim/files/patch-tools__qslim__qslim.cxx --- /usr/ports/graphics/qslim/files/patch-tools__qslim__qslim.cxx 1970-01-01 09:00:00.000000000 +0900 +++ graphics/qslim/files/patch-tools__qslim__qslim.cxx 2013-06-03 00:00:00.000000000 +0900 @@ -0,0 +1,11 @@ +--- tools/qslim/qslim.cxx.orig ++++ tools/qslim/qslim.cxx +@@ -32,7 +32,7 @@ + output_preamble(); + } + +-main(int argc, char **argv) ++int main(int argc, char **argv) + { + double input_time, init_time, slim_time, output_time; + >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130603025101.585a66e16a461c03a2c16fb2>