Bug 184573 - devel/raknet : fix build with gcc47
Summary: devel/raknet : fix build with gcc47
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: Ganael LAPLANCHE
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-07 17:00 UTC by Christoph Moench-Tegeder
Modified: 2013-12-09 08:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Moench-Tegeder freebsd_committer freebsd_triage 2013-12-07 17:00:05 UTC
Hi,

in an effort towards upgrading lang/gcc to gcc 4.7, I'm helping gerald@
in making ports gcc47-safe.
Please consider the following patch to your port. If you approve of the
patch, gerald@ has offered his help in commiting it.
If you're commiting yourself or have someone else commit this (or
another patch to the same effect), can you please add an additional
reference to ports/183342 in the commit message?
In my test environment, the port built successfully with lang/gcc47.

Fix: GCC 4.7 needs an explicit this-> on member function calls.

# fix calls to member functions
$ svn status
A       files/patch-Source-DS_BinarySearchTree.h



Regards,
Christoph--M63jpaKnZabGW9DOi8QJDnHZIVIgcjF6ngpOkifFA9ggSwFo
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

Index: files/patch-Source-DS_BinarySearchTree.h
===================================================================
--- files/patch-Source-DS_BinarySearchTree.h	(revision 0)
+++ files/patch-Source-DS_BinarySearchTree.h	(working copy)
@@ -0,0 +1,66 @@
+--- Source/DS_BinarySearchTree.h.orig	2013-11-15 22:00:44.000000000 +0100
++++ Source/DS_BinarySearchTree.h	2013-11-15 22:02:47.000000000 +0100
+@@ -166,12 +166,12 @@
+ 			if ( current->left == 0 )
+ 				left_height = 0;
+ 			else
+-				left_height = Height( current->left );
++				left_height = this->Height( current->left );
+ 				
+ 			if ( current->right == 0 )
+ 				right_height = 0;
+ 			else
+-				right_height = Height( current->right );
++				right_height = this->Height( current->right );
+ 				
+ 			if ( right_height - left_height == 2 )
+ 			{
+@@ -199,7 +199,7 @@
+ 			if ( current == this->root )
+ 				break;
+ 				
+-			current = FindParent( *( current->item ) );
++			current = this->FindParent( *( current->item ) );
+ 			
+ 		}
+ 	}
+@@ -226,7 +226,7 @@
+ 		if ( A == 0 )
+ 			return false;
+ 			
+-		return Height( A->right ) > Height( A->left );
++		return this->Height( A->right ) > this->Height( A->left );
+ 	}
+ 	
+ 	template <class BinarySearchTreeType>
+@@ -235,7 +235,7 @@
+ 		if ( A == 0 )
+ 			return false;
+ 			
+-		return Height( A->left ) > Height( A->right );
++		return this->Height( A->left ) > this->Height( A->right );
+ 	}
+ 	
+ 	template <class BinarySearchTreeType>
+@@ -272,8 +272,8 @@
+ 		
+ 		*/
+ 		
+-		B = FindParent( *( C->item ) );
+-		A = FindParent( *( B->item ) );
++		B = this->FindParent( *( C->item ) );
++		A = this->FindParent( *( B->item ) );
+ 		D = C->right;
+ 		
+ 		if ( A )
+@@ -336,8 +336,8 @@
+ 		
+ 		*/
+ 		
+-		B = FindParent( *( C->item ) );
+-		A = FindParent( *( B->item ) );
++		B = this->FindParent( *( C->item ) );
++		A = this->FindParent( *( B->item ) );
+ 		D = C->left;
+ 		
+ 		if ( A )
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-12-07 17:00:38 UTC
Responsible Changed
From-To: freebsd-ports-bugs->martymac

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 gerald 2013-12-07 23:05:11 UTC
Apologies, the PR to reference should have been 182136.

Gerald
Comment 3 dfilter service freebsd_committer freebsd_triage 2013-12-09 08:18:44 UTC
Author: martymac
Date: Mon Dec  9 08:18:37 2013
New Revision: 335954
URL: http://svnweb.freebsd.org/changeset/ports/335954

Log:
  Fix build with Gcc 4.7
  
  PR:		ports/184573, ports/182136
  Submitted by:	Christoph Moench-Tegeder <cmt@burggraben.net>

Added:
  head/devel/raknet/files/patch-Source-DS_BinarySearchTree.h   (contents, props changed)

Added: head/devel/raknet/files/patch-Source-DS_BinarySearchTree.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/raknet/files/patch-Source-DS_BinarySearchTree.h	Mon Dec  9 08:18:37 2013	(r335954)
@@ -0,0 +1,66 @@
+--- Source/DS_BinarySearchTree.h.orig	2013-11-15 22:00:44.000000000 +0100
++++ Source/DS_BinarySearchTree.h	2013-11-15 22:02:47.000000000 +0100
+@@ -166,12 +166,12 @@
+ 			if ( current->left == 0 )
+ 				left_height = 0;
+ 			else
+-				left_height = Height( current->left );
++				left_height = this->Height( current->left );
+ 				
+ 			if ( current->right == 0 )
+ 				right_height = 0;
+ 			else
+-				right_height = Height( current->right );
++				right_height = this->Height( current->right );
+ 				
+ 			if ( right_height - left_height == 2 )
+ 			{
+@@ -199,7 +199,7 @@
+ 			if ( current == this->root )
+ 				break;
+ 				
+-			current = FindParent( *( current->item ) );
++			current = this->FindParent( *( current->item ) );
+ 			
+ 		}
+ 	}
+@@ -226,7 +226,7 @@
+ 		if ( A == 0 )
+ 			return false;
+ 			
+-		return Height( A->right ) > Height( A->left );
++		return this->Height( A->right ) > this->Height( A->left );
+ 	}
+ 	
+ 	template <class BinarySearchTreeType>
+@@ -235,7 +235,7 @@
+ 		if ( A == 0 )
+ 			return false;
+ 			
+-		return Height( A->left ) > Height( A->right );
++		return this->Height( A->left ) > this->Height( A->right );
+ 	}
+ 	
+ 	template <class BinarySearchTreeType>
+@@ -272,8 +272,8 @@
+ 		
+ 		*/
+ 		
+-		B = FindParent( *( C->item ) );
+-		A = FindParent( *( B->item ) );
++		B = this->FindParent( *( C->item ) );
++		A = this->FindParent( *( B->item ) );
+ 		D = C->right;
+ 		
+ 		if ( A )
+@@ -336,8 +336,8 @@
+ 		
+ 		*/
+ 		
+-		B = FindParent( *( C->item ) );
+-		A = FindParent( *( B->item ) );
++		B = this->FindParent( *( C->item ) );
++		A = this->FindParent( *( B->item ) );
+ 		D = C->left;
+ 		
+ 		if ( A )
_______________________________________________
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"
Comment 4 Ganael LAPLANCHE freebsd_committer freebsd_triage 2013-12-09 08:19:33 UTC
State Changed
From-To: open->closed

Committed, thanks!