diff -Naur btanks-0.9.8083/engine/sl08/sl08.h btanks-0.9.8083.new/engine/sl08/sl08.h
--- btanks-0.9.8083/engine/sl08/sl08.h	2008-08-13 11:10:45.000000000 +0200
+++ btanks-0.9.8083.new/engine/sl08/sl08.h	2013-03-29 18:07:08.191284006 +0100
@@ -92,11 +92,11 @@
 			typedef base_signal0 <return_type> signal_type; 
 			typedef return_type (object_type::*func_t) (); 
 
-			inline slot0 () : object(NULL), func(NULL) {}
-			inline slot0(object_type *object, func_t func, signal_type * signal = NULL) : object(object), func(func) {}
+			inline slot0 () : object(0), func(0) {}
+			inline slot0(object_type *object, func_t func, signal_type * signal = 0) : object(object), func(func) {}
 
 			inline void assign(object_type *o, func_t f) { object = o; func = f; }
-			inline void assign(object_type *o, func_t f, signal_type &signal_ref = NULL) { object = o; func = f; connect(signal_ref); }
+			inline void assign(object_type *o, func_t f, signal_type &signal_ref = NULL) { object = o; func = f; this->connect(signal_ref); }
 	
 			inline return_type operator() () const { 
 				return (object->*func) () ;
@@ -114,10 +114,10 @@
 			typedef base_signal0 <void> signal_type; 
 			typedef void (object_type::*func_t) () ;
 
-			inline slot0 () : object(NULL), func(NULL) {}
+			inline slot0 () : object(0), func(0) {}
 			inline slot0 (object_type *object, func_t func) : object(object), func(func) {}
 			inline void assign(object_type *o, func_t f) { object = o; func = f; }
-			inline void assign(object_type *o, func_t f, signal_type &signal_ref) { object = o; func = f; connect(signal_ref); }
+			inline void assign(object_type *o, func_t f, signal_type &signal_ref) { object = o; func = f; this->connect(signal_ref); }
 	
 			inline void operator() () const { 
 				(object->*func) (); 
@@ -267,11 +267,11 @@
 			typedef base_signal1 <return_type, arg1_type> signal_type; 
 			typedef return_type (object_type::*func_t) (arg1_type a1); 
 
-			inline slot1 () : object(NULL), func(NULL) {}
-			inline slot1(object_type *object, func_t func, signal_type * signal = NULL) : object(object), func(func) {}
+			inline slot1 () : object(0), func(0) {}
+			inline slot1(object_type *object, func_t func, signal_type * signal = 0) : object(object), func(func) {}
 
 			inline void assign(object_type *o, func_t f) { object = o; func = f; }
-			inline void assign(object_type *o, func_t f, signal_type &signal_ref = NULL) { object = o; func = f; connect(signal_ref); }
+			inline void assign(object_type *o, func_t f, signal_type &signal_ref = NULL) { object = o; func = f; this->connect(signal_ref); }
 	
 			inline return_type operator() (arg1_type a1) const { 
 				return (object->*func) (a1) ;
@@ -289,10 +289,10 @@
 			typedef base_signal1 <void, arg1_type> signal_type; 
 			typedef void (object_type::*func_t) (arg1_type a1) ;
 
-			inline slot1 () : object(NULL), func(NULL) {}
+			inline slot1 () : object(0), func(0) {}
 			inline slot1 (object_type *object, func_t func) : object(object), func(func) {}
 			inline void assign(object_type *o, func_t f) { object = o; func = f; }
-			inline void assign(object_type *o, func_t f, signal_type &signal_ref) { object = o; func = f; connect(signal_ref); }
+			inline void assign(object_type *o, func_t f, signal_type &signal_ref) { object = o; func = f; this->connect(signal_ref); }
 	
 			inline void operator() (arg1_type a1) const { 
 				(object->*func) (a1); 
@@ -442,11 +442,11 @@
 			typedef base_signal2 <return_type, arg1_type, arg2_type> signal_type; 
 			typedef return_type (object_type::*func_t) (arg1_type a1, arg2_type a2); 
 
-			inline slot2 () : object(NULL), func(NULL) {}
-			inline slot2(object_type *object, func_t func, signal_type * signal = NULL) : object(object), func(func) {}
+			inline slot2 () : object(0), func(0) {}
+			inline slot2(object_type *object, func_t func, signal_type * signal = 0) : object(object), func(func) {}
 
 			inline void assign(object_type *o, func_t f) { object = o; func = f; }
-			inline void assign(object_type *o, func_t f, signal_type &signal_ref = NULL) { object = o; func = f; connect(signal_ref); }
+			inline void assign(object_type *o, func_t f, signal_type &signal_ref = NULL) { object = o; func = f; this->connect(signal_ref); }
 	
 			inline return_type operator() (arg1_type a1, arg2_type a2) const { 
 				return (object->*func) (a1, a2) ;
@@ -464,10 +464,10 @@
 			typedef base_signal2 <void, arg1_type, arg2_type> signal_type; 
 			typedef void (object_type::*func_t) (arg1_type a1, arg2_type a2) ;
 
-			inline slot2 () : object(NULL), func(NULL) {}
+			inline slot2 () : object(0), func(0) {}
 			inline slot2 (object_type *object, func_t func) : object(object), func(func) {}
 			inline void assign(object_type *o, func_t f) { object = o; func = f; }
-			inline void assign(object_type *o, func_t f, signal_type &signal_ref) { object = o; func = f; connect(signal_ref); }
+			inline void assign(object_type *o, func_t f, signal_type &signal_ref) { object = o; func = f; this->connect(signal_ref); }
 	
 			inline void operator() (arg1_type a1, arg2_type a2) const { 
 				(object->*func) (a1, a2); 
@@ -617,11 +617,11 @@
 			typedef base_signal3 <return_type, arg1_type, arg2_type, arg3_type> signal_type; 
 			typedef return_type (object_type::*func_t) (arg1_type a1, arg2_type a2, arg3_type a3); 
 
-			inline slot3 () : object(NULL), func(NULL) {}
-			inline slot3(object_type *object, func_t func, signal_type * signal = NULL) : object(object), func(func) {}
+			inline slot3 () : object(0), func(0) {}
+			inline slot3(object_type *object, func_t func, signal_type * signal = 0) : object(object), func(func) {}
 
 			inline void assign(object_type *o, func_t f) { object = o; func = f; }
-			inline void assign(object_type *o, func_t f, signal_type &signal_ref = NULL) { object = o; func = f; connect(signal_ref); }
+			inline void assign(object_type *o, func_t f, signal_type &signal_ref = NULL) { object = o; func = f; this->connect(signal_ref); }
 	
 			inline return_type operator() (arg1_type a1, arg2_type a2, arg3_type a3) const { 
 				return (object->*func) (a1, a2, a3) ;
@@ -639,10 +639,10 @@
 			typedef base_signal3 <void, arg1_type, arg2_type, arg3_type> signal_type; 
 			typedef void (object_type::*func_t) (arg1_type a1, arg2_type a2, arg3_type a3) ;
 
-			inline slot3 () : object(NULL), func(NULL) {}
+			inline slot3 () : object(0), func(0) {}
 			inline slot3 (object_type *object, func_t func) : object(object), func(func) {}
 			inline void assign(object_type *o, func_t f) { object = o; func = f; }
-			inline void assign(object_type *o, func_t f, signal_type &signal_ref) { object = o; func = f; connect(signal_ref); }
+			inline void assign(object_type *o, func_t f, signal_type &signal_ref) { object = o; func = f; this->connect(signal_ref); }
 	
 			inline void operator() (arg1_type a1, arg2_type a2, arg3_type a3) const { 
 				(object->*func) (a1, a2, a3); 
@@ -792,11 +792,11 @@
 			typedef base_signal4 <return_type, arg1_type, arg2_type, arg3_type, arg4_type> signal_type; 
 			typedef return_type (object_type::*func_t) (arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4); 
 
-			inline slot4 () : object(NULL), func(NULL) {}
-			inline slot4(object_type *object, func_t func, signal_type * signal = NULL) : object(object), func(func) {}
+			inline slot4 () : object(0), func(0) {}
+			inline slot4(object_type *object, func_t func, signal_type * signal = 0) : object(object), func(func) {}
 
 			inline void assign(object_type *o, func_t f) { object = o; func = f; }
-			inline void assign(object_type *o, func_t f, signal_type &signal_ref = NULL) { object = o; func = f; connect(signal_ref); }
+			inline void assign(object_type *o, func_t f, signal_type &signal_ref = NULL) { object = o; func = f; this->connect(signal_ref); }
 	
 			inline return_type operator() (arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4) const { 
 				return (object->*func) (a1, a2, a3, a4) ;
@@ -814,10 +814,10 @@
 			typedef base_signal4 <void, arg1_type, arg2_type, arg3_type, arg4_type> signal_type; 
 			typedef void (object_type::*func_t) (arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4) ;
 
-			inline slot4 () : object(NULL), func(NULL) {}
+			inline slot4 () : object(0), func(0) {}
 			inline slot4 (object_type *object, func_t func) : object(object), func(func) {}
 			inline void assign(object_type *o, func_t f) { object = o; func = f; }
-			inline void assign(object_type *o, func_t f, signal_type &signal_ref) { object = o; func = f; connect(signal_ref); }
+			inline void assign(object_type *o, func_t f, signal_type &signal_ref) { object = o; func = f; this->connect(signal_ref); }
 	
 			inline void operator() (arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4) const { 
 				(object->*func) (a1, a2, a3, a4); 
@@ -967,11 +967,11 @@
 			typedef base_signal5 <return_type, arg1_type, arg2_type, arg3_type, arg4_type, arg5_type> signal_type; 
 			typedef return_type (object_type::*func_t) (arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, arg5_type a5); 
 
-			inline slot5 () : object(NULL), func(NULL) {}
+			inline slot5 () : object(0), func(0) {}
 			inline slot5(object_type *object, func_t func, signal_type * signal = NULL) : object(object), func(func) {}
 
 			inline void assign(object_type *o, func_t f) { object = o; func = f; }
-			inline void assign(object_type *o, func_t f, signal_type &signal_ref = NULL) { object = o; func = f; connect(signal_ref); }
+			inline void assign(object_type *o, func_t f, signal_type &signal_ref = NULL) { object = o; func = f; this->connect(signal_ref); }
 	
 			inline return_type operator() (arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, arg5_type a5) const { 
 				return (object->*func) (a1, a2, a3, a4, a5) ;
@@ -989,10 +989,10 @@
 			typedef base_signal5 <void, arg1_type, arg2_type, arg3_type, arg4_type, arg5_type> signal_type; 
 			typedef void (object_type::*func_t) (arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, arg5_type a5) ;
 
-			inline slot5 () : object(NULL), func(NULL) {}
+			inline slot5 () : object(0), func(0) {}
 			inline slot5 (object_type *object, func_t func) : object(object), func(func) {}
 			inline void assign(object_type *o, func_t f) { object = o; func = f; }
-			inline void assign(object_type *o, func_t f, signal_type &signal_ref) { object = o; func = f; connect(signal_ref); }
+			inline void assign(object_type *o, func_t f, signal_type &signal_ref) { object = o; func = f; this->connect(signal_ref); }
 	
 			inline void operator() (arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, arg5_type a5) const { 
 				(object->*func) (a1, a2, a3, a4, a5); 
diff -Naur btanks-0.9.8083/engine/sl08/sl08.py btanks-0.9.8083.new/engine/sl08/sl08.py
--- btanks-0.9.8083/engine/sl08/sl08.py	2008-08-13 11:10:45.000000000 +0200
+++ btanks-0.9.8083.new/engine/sl08/sl08.py	2013-03-29 18:00:03.817312645 +0100
@@ -152,11 +152,11 @@
 			typedef base_signalXXX %s signal_type; 
 			typedef return_type (object_type::*func_t) %s; 
 
-			inline slotXXX () : object(NULL), func(NULL) {}
-			inline slotXXX(object_type *object, func_t func, signal_type * signal = NULL) : object(object), func(func) {}
+			inline slotXXX () : object(0), func(0) {}
+			inline slotXXX(object_type *object, func_t func, signal_type * signal = 0) : object(object), func(func) {}
 
 			inline void assign(object_type *o, func_t f) { object = o; func = f; }
-			inline void assign(object_type *o, func_t f, signal_type &signal_ref = NULL) { object = o; func = f; connect(signal_ref); }
+			inline void assign(object_type *o, func_t f, signal_type &signal_ref = NULL) { object = o; func = f; this->connect(signal_ref); }
 	
 			inline return_type operator() %s const { 
 				return (object->*func) %s ;
@@ -187,10 +187,10 @@
 			typedef base_signalXXX %s signal_type; 
 			typedef void (object_type::*func_t) %s ;
 
-			inline slotXXX () : object(NULL), func(NULL) {}
+			inline slotXXX () : object(0), func(0) {}
 			inline slotXXX (object_type *object, func_t func) : object(object), func(func) {}
 			inline void assign(object_type *o, func_t f) { object = o; func = f; }
-			inline void assign(object_type *o, func_t f, signal_type &signal_ref) { object = o; func = f; connect(signal_ref); }
+			inline void assign(object_type *o, func_t f, signal_type &signal_ref) { object = o; func = f; this->connect(signal_ref); }
 	
 			inline void operator() %s const { 
 				(object->*func) %s; 
diff -Naur btanks-0.9.8083/math/range_list.h btanks-0.9.8083.new/math/range_list.h
--- btanks-0.9.8083/math/range_list.h	2008-10-24 16:15:55.000000000 +0200
+++ btanks-0.9.8083.new/math/range_list.h	2013-03-29 17:55:59.060329162 +0100
@@ -53,14 +53,14 @@
 			return;
 		}
 	
-		typename parent_type::iterator i = lower_bound(value);
+		typename parent_type::iterator i = this->lower_bound(value);
 		if (i != parent_type::end()) {
 			if (i->first == value)
 				return;
 
 			if (value + 1 == i->first) {
 				T e = i->second;
-				erase(i);
+				this->erase(i);
 				i = parent_type::insert(typename parent_type::value_type(value, e)).first; //expand beginning
 				i = pack_left(i);
 			}
diff -Naur btanks-0.9.8083/mrt/base_file.h btanks-0.9.8083.new/mrt/base_file.h
--- btanks-0.9.8083/mrt/base_file.h	2009-04-04 22:28:59.000000000 +0200
+++ btanks-0.9.8083.new/mrt/base_file.h	2013-03-29 17:52:20.055343942 +0100
@@ -20,6 +20,7 @@
 */
 
 #include <string>
+#include <unistd.h>
 #include "export_mrt.h"
 
 namespace mrt {
