Bug 179225 - graphics/qslim: Fix build with clang
Summary: graphics/qslim: Fix build with clang
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Martin Wilke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-02 19:10 UTC by tkato432
Modified: 2013-06-04 11:10 UTC (History)
0 users

See Also:


Attachments
file.diff (3.82 KB, patch)
2013-06-02 19:10 UTC, tkato432
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tkato432 2013-06-02 19:10:07 UTC
- Fix build with clang

New file:
files/patch-mixkit__src__MxDynBlock.h
files/patch-mixkit__src__MxStack.h
files/patch-tools__qslim__qslim.cxx
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-06-02 19:11:37 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

miwi@ wants this submitter's PRs (via the GNATS Auto Assign Tool)
Comment 2 Martin Wilke freebsd_committer freebsd_triage 2013-06-04 11:03:22 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 3 dfilter service freebsd_committer freebsd_triage 2013-06-04 11:03:31 UTC
Author: miwi
Date: Tue Jun  4 10:03:18 2013
New Revision: 319848
URL: http://svnweb.freebsd.org/changeset/ports/319848

Log:
  - Fix build with clang
  
  PR:		179225
  Submitted by:	Ports Fury

Added:
  head/graphics/qslim/files/patch-mixkit__src__MxDynBlock.h   (contents, props changed)
  head/graphics/qslim/files/patch-mixkit__src__MxStack.h   (contents, props changed)
  head/graphics/qslim/files/patch-tools__qslim__qslim.cxx   (contents, props changed)
Modified:
  head/graphics/qslim/files/patch-tools-qslim_qvis.cxx   (contents, props changed)

Added: head/graphics/qslim/files/patch-mixkit__src__MxDynBlock.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/qslim/files/patch-mixkit__src__MxDynBlock.h	Tue Jun  4 10:03:18 2013	(r319848)
@@ -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); }
+ };

Added: head/graphics/qslim/files/patch-mixkit__src__MxStack.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/qslim/files/patch-mixkit__src__MxStack.h	Tue Jun  4 10:03:18 2013	(r319848)
@@ -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

Modified: head/graphics/qslim/files/patch-tools-qslim_qvis.cxx
==============================================================================
--- head/graphics/qslim/files/patch-tools-qslim_qvis.cxx	Tue Jun  4 10:02:30 2013	(r319847)
+++ head/graphics/qslim/files/patch-tools-qslim_qvis.cxx	Tue Jun  4 10:03:18 2013	(r319848)
@@ -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;

Added: head/graphics/qslim/files/patch-tools__qslim__qslim.cxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/qslim/files/patch-tools__qslim__qslim.cxx	Tue Jun  4 10:03:18 2013	(r319848)
@@ -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;
+ 
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"