--- a/aapl/bstcommon.h.orig	2011-02-11 15:14:44.000000000 +1100
+++ b/aapl/bstcommon.h	2012-06-28 18:22:04.000000000 +1000
@@ -361,7 +361,7 @@ template <BST_TEMPL_DEF> bool BstTable<B
 		}
 
 		mid = lower + ((upper-lower)>>1);
-		keyRelation = compare(key, GET_KEY(*mid));
+		keyRelation = this->compare(key, GET_KEY(*mid));
 
 		if ( keyRelation < 0 )
 			upper = mid - 1;
@@ -373,12 +373,12 @@ template <BST_TEMPL_DEF> bool BstTable<B
 
 			lower = mid - 1;
 			while ( lower != lowEnd && 
-					compare(key, GET_KEY(*lower)) == 0 )
+					this->compare(key, GET_KEY(*lower)) == 0 )
 				lower--;
 
 			upper = mid + 1;
 			while ( upper != highEnd && 
-					compare(key, GET_KEY(*upper)) == 0 )
+					this->compare(key, GET_KEY(*upper)) == 0 )
 				upper++;
 			
 			low = (Element*)lower + 1;
@@ -419,7 +419,7 @@ template <BST_TEMPL_DEF> Element *BstTab
 		}
 
 		mid = lower + ((upper-lower)>>1);
-		keyRelation = compare(key, GET_KEY(*mid));
+		keyRelation = this->compare(key, GET_KEY(*mid));
 
 		if ( keyRelation < 0 )
 			upper = mid - 1;
@@ -457,7 +457,7 @@ template <BST_TEMPL_DEF> Element *BstTab
 		}
 
 		mid = lower + ((upper-lower)>>1);
-		keyRelation = compare(key, GET_KEY(*mid));
+		keyRelation = this->compare(key, GET_KEY(*mid));
 
 		if ( keyRelation < 0 )
 			upper = mid - 1;
@@ -508,7 +508,7 @@ template <BST_TEMPL_DEF> Element *BstTab
 		}
 
 		mid = lower + ((upper-lower)>>1);
-		keyRelation = compare(key, GET_KEY(*mid));
+		keyRelation = this->compare(key, GET_KEY(*mid));
 
 		if ( keyRelation < 0 )
 			upper = mid - 1;
@@ -603,7 +603,7 @@ template <BST_TEMPL_DEF> Element *BstTab
 		}
 
 		mid = lower + ((upper-lower)>>1);
-		keyRelation = compare(GET_KEY(el), GET_KEY(*mid));
+		keyRelation = this->compare(GET_KEY(el), GET_KEY(*mid));
 
 		if ( keyRelation < 0 )
 			upper = mid - 1;
@@ -662,7 +662,7 @@ template <BST_TEMPL_DEF> Element *BstTab
 		}
 
 		mid = lower + ((upper-lower)>>1);
-		keyRelation = compare(GET_KEY(el), GET_KEY(*mid));
+		keyRelation = this->compare(GET_KEY(el), GET_KEY(*mid));
 
 		if ( keyRelation < 0 )
 			upper = mid - 1;
--- a/aapl/mergesort.h.orig	2011-02-11 15:14:44.000000000 +1100
+++ b/aapl/mergesort.h	2012-06-28 18:24:41.000000000 +1000
@@ -110,7 +110,7 @@ template< class T, class Compare> void M
 		}
 		else {
 			/* Both upper and lower left. */
-			if ( compare(*lower, *upper) <= 0 )
+			if ( this->compare(*lower, *upper) <= 0 )
 				memcpy( dest++, lower++, sizeof(T) );
 			else
 				memcpy( dest++, upper++, sizeof(T) );
--- a/aapl/bubblesort.h.orig	2011-02-11 15:14:44.000000000 +1100
+++ b/aapl/bubblesort.h	2012-06-28 18:25:59.000000000 +1000
@@ -72,7 +72,7 @@ template <class T, class Compare> void B
 		changed = false;
 		for ( long i = 0; i < len-pass; i++ ) {
 			/* Do we swap pos with the next one? */
-			if ( compare( data[i], data[i+1] ) > 0 ) {
+			if ( this->compare( data[i], data[i+1] ) > 0 ) {
 				char tmp[sizeof(T)];
 
 				/* Swap the two items. */
--- a/aapl/avlcommon.h.orig	2011-02-11 15:14:44.000000000 +1100
+++ b/aapl/avlcommon.h	2012-06-28 18:27:36.000000000 +1000
@@ -881,9 +881,9 @@ template <AVLMEL_TEMPDEF> Element *AvlTr
 		}
 
 #ifdef AVL_BASIC
-		keyRelation = compare( *element, *curEl );
+		keyRelation = this->compare( *element, *curEl );
 #else
-		keyRelation = compare( element->BASEKEY(getKey()), 
+		keyRelation = this->compare( element->BASEKEY(getKey()), 
 				curEl->BASEKEY(getKey()) );
 #endif
 
@@ -920,7 +920,7 @@ template <AVLMEL_TEMPDEF> Element *AvlTr
 	long keyRelation;
 
 	while (curEl) {
-		keyRelation = compare( *element, *curEl );
+		keyRelation = this->compare( *element, *curEl );
 
 		/* Do we go left? */
 		if ( keyRelation < 0 )
@@ -969,7 +969,7 @@ template <AVLMEL_TEMPDEF> Element *AvlTr
 			return element;
 		}
 
-		keyRelation = compare( key, curEl->BASEKEY(getKey()) );
+		keyRelation = this->compare( key, curEl->BASEKEY(getKey()) );
 
 		/* Do we go left? */
 		if ( keyRelation < 0 ) {
@@ -1023,7 +1023,7 @@ template <AVLMEL_TEMPDEF> Element *AvlTr
 			return element;
 		}
 
-		keyRelation = compare(key, curEl->getKey());
+		keyRelation = this->compare(key, curEl->getKey());
 
 		/* Do we go left? */
 		if ( keyRelation < 0 ) {
@@ -1058,7 +1058,7 @@ template <AVLMEL_TEMPDEF> Element *AvlTr
 	long keyRelation;
 
 	while (curEl) {
-		keyRelation = compare( key, curEl->BASEKEY(getKey()) );
+		keyRelation = this->compare( key, curEl->BASEKEY(getKey()) );
 
 		/* Do we go left? */
 		if ( keyRelation < 0 )
--- a/ragel/javacodegen.cpp.orig	2011-02-11 15:14:43.000000000 +1100
+++ b/ragel/javacodegen.cpp	2012-06-28 18:29:53.000000000 +1000
@@ -1184,7 +1184,7 @@ std::ostream &JavaTabCodeGen::ARRAY_ITEM
 {
 	item_count++;
 
-	out << setw(5) << setiosflags(ios::right) << item;
+	out << setw(5) << std::setiosflags(ios::right) << item;
 	
 	if ( !last ) {
 		if ( item_count % SAIIC == 0 ) {
