Index: code/trunk/src/libraries/util/CMakeLists.txt
===================================================================
--- code/trunk/src/libraries/util/CMakeLists.txt	(revision 8267)
+++ code/trunk/src/libraries/util/CMakeLists.txt	(revision 8351)
@@ -19,29 +19,26 @@
 
 SET_SOURCE_FILES(UTIL_SRC_FILES
-  Clock.cc
-  Exception.cc
-  ExprParser.cc
-  Math.cc
-  MultiType.cc
-  Scope.cc
-  StringUtils.cc
 COMPILATION_BEGIN StableCompilation.cc
   Clipboard.cc
+  Clock.cc
   Convert.cc
   CRC32.cc
+  ExprParser.cc
   OutputHandler.cc
+  Scope.cc
   ScopedSingletonManager.cc
   SharedPtr.cc
-  SignalHandler.cc
   Sleep.cc
   SmallObjectAllocator.cc
   SubString.cc
 COMPILATION_END
+
+  MultiType.cc
+  Exception.cc
+  Math.cc
+  SignalHandler.cc
+  StringUtils.cc
 )
 
-IF(GCC_NO_SYSTEM_HEADER_SUPPORT)
-  # Get around displaying a few hundred lines of warning code
-  SET_SOURCE_FILES_PROPERTIES(MultiType.cc PROPERTIES COMPILE_FLAGS "-w")
-ENDIF()
 IF(MSVC)
   # Simply using #pragma warning(disable:4244) doesn't really disable it
Index: code/trunk/src/libraries/util/Convert.h
===================================================================
--- code/trunk/src/libraries/util/Convert.h	(revision 8267)
+++ code/trunk/src/libraries/util/Convert.h	(revision 8351)
@@ -143,5 +143,5 @@
     struct ConverterFallback
     {
-        FORCEINLINE static bool convert(ToType* output, const FromType& input)
+        ORX_FORCEINLINE static bool convert(ToType* output, const FromType& input)
         {
             COUT(2) << "Could not convert value of type " << typeid(FromType).name()
@@ -155,5 +155,5 @@
     struct ConverterFallback<FromType*, ToType*>
     {
-        FORCEINLINE static bool convert(ToType** output, FromType* const input)
+        ORX_FORCEINLINE static bool convert(ToType** output, FromType* const input)
         {
             ToType* temp = dynamic_cast<ToType*>(input);
@@ -182,5 +182,5 @@
 struct ConverterStringStream
 {
-    FORCEINLINE static bool convert(ToType* output, const FromType& input)
+    ORX_FORCEINLINE static bool convert(ToType* output, const FromType& input)
     {
         return orxonox::ConverterFallback<FromType, ToType>::convert(output, input);
@@ -198,5 +198,5 @@
     /// Fallback operator <<() (delegates to orxonox::ConverterFallback)
     template <class FromType>
-    FORCEINLINE bool operator <<(std::ostream& outstream,  const FromType& input)
+    ORX_FORCEINLINE bool operator <<(std::ostream& outstream,  const FromType& input)
     {
         std::string temp;
@@ -215,5 +215,5 @@
 struct ConverterStringStream<FromType, std::string>
 {
-    FORCEINLINE static bool convert(std::string* output, const FromType& input)
+    ORX_FORCEINLINE static bool convert(std::string* output, const FromType& input)
     {
         using namespace fallbackTemplates;
@@ -241,5 +241,5 @@
     /// Fallback operator >>() (delegates to orxonox::ConverterFallback)
     template <class ToType>
-    FORCEINLINE bool operator >>(std::istream& instream, ToType& output)
+    ORX_FORCEINLINE bool operator >>(std::istream& instream, ToType& output)
     {
         std::string input(static_cast<std::istringstream&>(instream).str());
@@ -252,5 +252,5 @@
 struct ConverterStringStream<std::string, ToType>
 {
-    FORCEINLINE static bool convert(ToType* output, const std::string& input)
+    ORX_FORCEINLINE static bool convert(ToType* output, const std::string& input)
     {
         using namespace fallbackTemplates;
@@ -276,5 +276,5 @@
     /// %Template delegates to ::ConverterStringStream
     template <class FromType, class ToType>
-    FORCEINLINE bool convertImplicitely(ToType* output, const FromType& input, Loki::Int2Type<false>)
+    ORX_FORCEINLINE bool convertImplicitely(ToType* output, const FromType& input, Loki::Int2Type<false>)
     {
         return ConverterStringStream<FromType, ToType>::convert(output, input);
@@ -283,5 +283,5 @@
     /// Makes an implicit cast from \a FromType to \a ToType
     template <class FromType, class ToType>
-    FORCEINLINE bool convertImplicitely(ToType* output, const FromType& input, Loki::Int2Type<true>)
+    ORX_FORCEINLINE bool convertImplicitely(ToType* output, const FromType& input, Loki::Int2Type<true>)
     {
         (*output) = static_cast<ToType>(input);
@@ -303,5 +303,5 @@
     {
         enum { probe = ImplicitConversion<FromType, ToType>::exists };
-        FORCEINLINE static bool convert(ToType* output, const FromType& input)
+        ORX_FORCEINLINE static bool convert(ToType* output, const FromType& input)
         {
             // Use the probe's value to delegate to the right function
@@ -327,5 +327,5 @@
     */
     template <class FromType, class ToType>
-    FORCEINLINE bool convertValue(ToType* output, const FromType& input)
+    ORX_FORCEINLINE bool convertValue(ToType* output, const FromType& input)
     {
         return ConverterExplicit<FromType, ToType>::convert(output, input);
@@ -348,5 +348,5 @@
     */
     template<class FromType, class ToType>
-    FORCEINLINE bool convertValue(ToType* output, const FromType& input, const ToType& fallback)
+    ORX_FORCEINLINE bool convertValue(ToType* output, const FromType& input, const ToType& fallback)
     {
         if (convertValue(output, input))
@@ -361,5 +361,5 @@
     /// Directly returns the converted value, but uses the fallback on failure. @see convertValue
     template<class FromType, class ToType>
-    FORCEINLINE ToType getConvertedValue(const FromType& input, const ToType& fallback)
+    ORX_FORCEINLINE ToType getConvertedValue(const FromType& input, const ToType& fallback)
     {
         ToType output;
@@ -380,5 +380,5 @@
     */
     template<class ToType, class FromType>
-    FORCEINLINE ToType multi_cast(const FromType& input)
+    ORX_FORCEINLINE ToType multi_cast(const FromType& input)
     {
         ToType output;
@@ -395,5 +395,5 @@
     struct ConverterExplicit<const char*, ToType>
     {
-        FORCEINLINE static bool convert(ToType* output, const char* input)
+        ORX_FORCEINLINE static bool convert(ToType* output, const char* input)
         {
             return convertValue<std::string, ToType>(output, input);
@@ -405,5 +405,5 @@
     struct ConverterExplicit<char, std::string>
     {
-        FORCEINLINE static bool convert(std::string* output, const char input)
+        ORX_FORCEINLINE static bool convert(std::string* output, const char input)
         {
             *output = input;
@@ -415,5 +415,5 @@
     struct ConverterExplicit<unsigned char, std::string>
     {
-        FORCEINLINE static bool convert(std::string* output, const unsigned char input)
+        ORX_FORCEINLINE static bool convert(std::string* output, const unsigned char input)
         {
             *output = input;
@@ -425,5 +425,5 @@
     struct ConverterExplicit<std::string, char>
     {
-        FORCEINLINE static bool convert(char* output, const std::string& input)
+        ORX_FORCEINLINE static bool convert(char* output, const std::string& input)
         {
             if (!input.empty())
@@ -438,5 +438,5 @@
     struct ConverterExplicit<std::string, unsigned char>
     {
-        FORCEINLINE static bool convert(unsigned char* output, const std::string& input)
+        ORX_FORCEINLINE static bool convert(unsigned char* output, const std::string& input)
         {
             if (!input.empty())
@@ -453,5 +453,5 @@
     struct ConverterExplicit<bool, std::string>
     {
-        FORCEINLINE static bool convert(std::string* output, const bool& input)
+        ORX_FORCEINLINE static bool convert(std::string* output, const bool& input)
         {
             if (input)
Index: code/trunk/src/libraries/util/Exception.cc
===================================================================
--- code/trunk/src/libraries/util/Exception.cc	(revision 8267)
+++ code/trunk/src/libraries/util/Exception.cc	(revision 8351)
@@ -35,4 +35,5 @@
 #include "Exception.h"
 
+#include <cstddef>
 #include <CEGUIExceptions.h>
 #include "Debug.h"
@@ -95,16 +96,12 @@
             throw;
         }
+        catch (const CEGUI::Exception& ex)
+        {
+            return GeneralException(ex.getMessage().c_str(), ex.getLine(),
+                ex.getFileName().c_str(), ex.getName().c_str()).getDescription();
+        }
         catch (const std::exception& ex)
         {
             return ex.what();
-        }
-        catch (const CEGUI::Exception& ex)
-        {
-#if CEGUI_VERSION_MAJOR == 0 && CEGUI_VERSION_MINOR < 6
-            return GeneralException(ex.getMessage().c_str()).getDescription();
-#else
-            return GeneralException(ex.getMessage().c_str(), ex.getLine(),
-                ex.getFileName().c_str(), ex.getName().c_str()).getDescription();
-#endif
         }
         catch (...)
Index: code/trunk/src/libraries/util/ExprParser.cc
===================================================================
--- code/trunk/src/libraries/util/ExprParser.cc	(revision 8267)
+++ code/trunk/src/libraries/util/ExprParser.cc	(revision 8351)
@@ -52,9 +52,9 @@
     {
         this->failed_ = false;
-        this->variables_["pi"] = math::pi_d;
-        this->variables_["e"] = math::e_d;
-    }
-
-    void ExprParser::setVariable(const std::string& varname, double value)
+        this->variables_["pi"] = math::pi;
+        this->variables_["e"] = math::e;
+    }
+
+    void ExprParser::setVariable(const std::string& varname, float value)
     {
         this->variables_[varname] = value;
@@ -78,7 +78,7 @@
     //Private functions:
     /******************/
-    double ExprParser::parse_argument()
-    {
-        double value = parse_expr_8();
+    float ExprParser::parse_argument()
+    {
+        float value = parse_expr_8();
         if (*reading_stream == ',')
         {
@@ -93,7 +93,7 @@
     }
 
-    double ExprParser::parse_last_argument()
-    {
-        double value = parse_expr_8();
+    float ExprParser::parse_last_argument()
+    {
+        float value = parse_expr_8();
         if (*reading_stream == ')')
         {
@@ -108,7 +108,7 @@
     }
 
-    double ExprParser::parse_expr_8()
-    {
-        double value = parse_expr_7();
+    float ExprParser::parse_expr_8()
+    {
+        float value = parse_expr_7();
         for(;;)
         {
@@ -124,7 +124,7 @@
 
 
-    double ExprParser::parse_expr_7()
-    {
-        double value = parse_expr_6();
+    float ExprParser::parse_expr_7()
+    {
+        float value = parse_expr_6();
         for(;;)
         {
@@ -139,7 +139,7 @@
     }
 
-    double ExprParser::parse_expr_6()
-    {
-        double value = parse_expr_5();
+    float ExprParser::parse_expr_6()
+    {
+        float value = parse_expr_5();
         for(;;)
         {
@@ -158,7 +158,7 @@
     }
 
-    double ExprParser::parse_expr_5()
-    {
-        double value = parse_expr_4();
+    float ExprParser::parse_expr_5()
+    {
+        float value = parse_expr_4();
         for(;;)
         {
@@ -183,7 +183,7 @@
     }
 
-    double ExprParser::parse_expr_4()
-    {
-        double value = parse_expr_3();
+    float ExprParser::parse_expr_4()
+    {
+        float value = parse_expr_3();
         for(;;)
         {
@@ -202,7 +202,7 @@
     }
 
-    double ExprParser::parse_expr_3()
-    {
-        double value = parse_expr_2();
+    float ExprParser::parse_expr_3()
+    {
+        float value = parse_expr_2();
         for(;;)
         {
@@ -217,5 +217,5 @@
             case modulo:
                 {
-                    double temp = parse_expr_2();
+                    float temp = parse_expr_2();
                     value = value - floor(value/temp)*temp;
                     break;
@@ -227,7 +227,7 @@
     }
 
-    double ExprParser::parse_expr_2()
-    {
-        double value = parse_expr_1();
+    float ExprParser::parse_expr_2()
+    {
+        float value = parse_expr_1();
         while (*reading_stream != '\0')
         {
@@ -246,8 +246,8 @@
     }
 
-    double ExprParser::parse_expr_1()
+    float ExprParser::parse_expr_1()
     {
         PARSE_BLANKS;
-        double value;
+        float value;
 
         unary_operator op = parse_unary_operator();
@@ -262,5 +262,5 @@
         else if ((*reading_stream > 47 && *reading_stream < 59) || *reading_stream == 46)
         {  // number
-            value = strtod(reading_stream, const_cast<char**>(&reading_stream));
+            value = (float)strtod(reading_stream, const_cast<char**>(&reading_stream));
         }
         else if ((*reading_stream > 64 && *reading_stream < 91) || (*reading_stream > 96 && *reading_stream < 123) || *reading_stream == 46)
@@ -306,5 +306,5 @@
                 {
                     value = parse_last_argument();
-                    value = 0.5*log((value + 1)/(value - 1));
+                    value = 0.5f*log((value + 1.0f)/(value - 1.0f));
                 }
                 CASE("int")
@@ -325,16 +325,16 @@
                 {
                     value = parse_last_argument();
-                    value = (value>0 ? 1 : (value<0 ? -1 : 0));
+                    value = (value>0.0f ? 1.0f : (value<0.0f ? -1.0f : 0.0f));
                 }
                 CASE("sqrt")
                     value = sqrt(parse_last_argument());
                 CASE("degrees")
-                    value = parse_last_argument()*180/math::pi_d;
+                    value = parse_last_argument()*180.0f/math::pi;
                 CASE("radians")
-                    value = parse_last_argument()*math::pi_d/180;
+                    value = parse_last_argument()*math::pi/180.0f;
                 CASE("mod")
                 {
                     value = parse_argument();
-                    double value2 = parse_last_argument();
+                    float value2 = parse_last_argument();
                     value = value - floor(value/value2)*value2;
                 }
@@ -356,5 +356,5 @@
             else
             {
-                std::map<std::string, double>::const_iterator it = this->variables_.find(word);
+                std::map<std::string, float>::const_iterator it = this->variables_.find(word);
                 if (it != this->variables_.end())
                     value = it->second;
Index: code/trunk/src/libraries/util/ExprParser.h
===================================================================
--- code/trunk/src/libraries/util/ExprParser.h	(revision 8267)
+++ code/trunk/src/libraries/util/ExprParser.h	(revision 8351)
@@ -57,5 +57,5 @@
                 COUT(2) << "Warning: Expression could not be parsed to the end! Remains: '" << expr.getRemains() << '\'' << std::endl;
             }
-            double result = expr.getResult();
+            float result = expr.getResult();
         }
         else
@@ -125,39 +125,39 @@
         void parse(const std::string& str);
         const std::string& getRemains() { return  this->remains_; }
-        double             getResult()  { return  this->result_; }
+        float              getResult()  { return  this->result_; }
         bool               getSuccess() { return !this->failed_; }
 
-        void setVariable(const std::string& varname, double value);
+        void setVariable(const std::string& varname, float value);
 
     private:
-        double parse_expr_1();
-        double parse_expr_2();
-        double parse_expr_3();
-        double parse_expr_4();
-        double parse_expr_5();
-        double parse_expr_6();
-        double parse_expr_7();
-        double parse_expr_8();
+        float parse_expr_1();
+        float parse_expr_2();
+        float parse_expr_3();
+        float parse_expr_4();
+        float parse_expr_5();
+        float parse_expr_6();
+        float parse_expr_7();
+        float parse_expr_8();
         char* parse_word(char* str);
         binary_operator parse_binary_operator();
         unary_operator parse_unary_operator();
 
-        double parse_argument();
-        double parse_last_argument();
+        float parse_argument();
+        float parse_last_argument();
 
         binary_operator op;
         const char* reading_stream;
         bool failed_;
-        double result_;
+        float result_;
         std::string remains_;
-        std::map<std::string, double> variables_;
+        std::map<std::string, float> variables_;
     };
 
     //Endzeichen für float expression: ')', '}', ']', ',', ';'
-    _UtilExport bool parse_float(char* const, char**, double*);
+    _UtilExport bool parse_float(char* const, char**, float*);
     //Endzeichen angegeben
-    _UtilExport bool parse_float(char* const, char**, char, double*);
+    _UtilExport bool parse_float(char* const, char**, char, float*);
     //Letzter Teil-float eines Vektors parsen (keine Vergleichs- und Logikoperationen)
-    _UtilExport bool parse_vector_float(char* const, char**, bool, double*);
+    _UtilExport bool parse_vector_float(char* const, char**, bool, float*);
 }
 
Index: code/trunk/src/libraries/util/Math.h
===================================================================
--- code/trunk/src/libraries/util/Math.h	(revision 8267)
+++ code/trunk/src/libraries/util/Math.h	(revision 8351)
@@ -66,20 +66,18 @@
 namespace orxonox
 {
-    // C++ doesn't define any constants for pi, e, etc.
+    /** Often used numerical constants because C++ doesn't define any.
+    @note
+        The values here are decimal representations of the approximate floating
+        point value as it is stored according to the IEEE 754 standard.
+    */
     namespace math
     {
-        const float pi      = 3.14159265f;      ///< PI
-        const float pi_2    = 1.57079633f;      ///< PI / 2
-        const float pi_4    = 7.85398163e-1f;   ///< PI / 4
-        const float e       = 2.71828183f;      ///< e
-        const float sqrt2   = 1.41421356f;      ///< sqrt(2)
-        const float sqrt2_2 = 7.07106781e-1f;   ///< sqrt(2) / 2
-
-        const double pi_d      = 3.14159265358979324;       ///< PI (double)
-        const double pi_2_d    = 1.57079632679489662;       ///< PI / 2 (double)
-        const double pi_4_d    = 7.85398163397448310e-1;    ///< PI / 4 (double)
-        const double e_d       = 2.71828182845904524;       ///< e (double)
-        const double sqrt2_d   = 1.41421356237309505;       ///< sqrt(2) (double)
-        const double sqrt2_2_d = 7.07106781186547524e-1;    ///< sqrt(2) / 2 (double)
+        const float twoPi   = 6.283185482025146484375f;     ///< PI * 2
+        const float pi      = 3.1415927410125732421875f;    ///< PI
+        const float pi_2    = 1.57079637050628662109375f;   ///< PI / 2
+        const float pi_4    = 0.785398185253143310546875f;  ///< PI / 4
+        const float e       = 2.718281269073486328125f;     ///< e
+        const float sqrt2   = 1.41421353816986083984375f;   ///< sqrt(2)
+        const float sqrt2_2 = 0.707106769084930419921875f;  ///< sqrt(2) / 2
     }
 
Index: code/trunk/src/libraries/util/MathConvert.h
===================================================================
--- code/trunk/src/libraries/util/MathConvert.h	(revision 8267)
+++ code/trunk/src/libraries/util/MathConvert.h	(revision 8351)
@@ -51,5 +51,5 @@
     struct ConverterExplicit<orxonox::Vector2, std::string>
     {
-        FORCEINLINE static bool convert(std::string* output, const orxonox::Vector2& input)
+        ORX_FORCEINLINE static bool convert(std::string* output, const orxonox::Vector2& input)
         {
             std::ostringstream ostream;
@@ -67,5 +67,5 @@
     struct ConverterExplicit<orxonox::Vector3, std::string>
     {
-        FORCEINLINE static bool convert(std::string* output, const orxonox::Vector3& input)
+        ORX_FORCEINLINE static bool convert(std::string* output, const orxonox::Vector3& input)
         {
             std::ostringstream ostream;
@@ -83,5 +83,5 @@
     struct ConverterExplicit<orxonox::Vector4, std::string>
     {
-        FORCEINLINE static bool convert(std::string* output, const orxonox::Vector4& input)
+        ORX_FORCEINLINE static bool convert(std::string* output, const orxonox::Vector4& input)
         {
             std::ostringstream ostream;
@@ -99,5 +99,5 @@
     struct ConverterExplicit<orxonox::Quaternion, std::string>
     {
-        FORCEINLINE static bool convert(std::string* output, const orxonox::Quaternion& input)
+        ORX_FORCEINLINE static bool convert(std::string* output, const orxonox::Quaternion& input)
         {
             std::ostringstream ostream;
@@ -115,5 +115,5 @@
     struct ConverterExplicit<orxonox::ColourValue, std::string>
     {
-        FORCEINLINE static bool convert(std::string* output, const orxonox::ColourValue& input)
+        ORX_FORCEINLINE static bool convert(std::string* output, const orxonox::ColourValue& input)
         {
             std::ostringstream ostream;
@@ -157,5 +157,5 @@
     struct ConverterFallback<orxonox::Radian, ToType>
     {
-        FORCEINLINE static bool convert(ToType* output, const orxonox::Radian& input)
+        ORX_FORCEINLINE static bool convert(ToType* output, const orxonox::Radian& input)
         {
             return convertValue<Ogre::Real, ToType>(output, input.valueRadians());
@@ -167,5 +167,5 @@
     struct ConverterFallback<orxonox::Degree, ToType>
     {
-        FORCEINLINE static bool convert(ToType* output, const orxonox::Degree& input)
+        ORX_FORCEINLINE static bool convert(ToType* output, const orxonox::Degree& input)
         {
             return convertValue<Ogre::Real, ToType>(output, input.valueDegrees());
@@ -177,5 +177,5 @@
     struct ConverterFallback<FromType, orxonox::Radian>
     {
-        FORCEINLINE static bool convert(orxonox::Radian* output, const FromType& input)
+        ORX_FORCEINLINE static bool convert(orxonox::Radian* output, const FromType& input)
         {
             float temp;
@@ -194,5 +194,5 @@
     struct ConverterFallback<FromType, orxonox::Degree>
     {
-        FORCEINLINE static bool convert(orxonox::Degree* output, const FromType& input)
+        ORX_FORCEINLINE static bool convert(orxonox::Degree* output, const FromType& input)
         {
             float temp;
Index: code/trunk/src/libraries/util/SharedPtr.h
===================================================================
--- code/trunk/src/libraries/util/SharedPtr.h	(revision 8267)
+++ code/trunk/src/libraries/util/SharedPtr.h	(revision 8351)
@@ -163,4 +163,5 @@
             public:
                 SharedCounter() : count_(1) {}
+                virtual ~SharedCounter() {}
                 virtual void destroy() = 0;
 
@@ -186,5 +187,5 @@
         _UtilExport SmallObjectAllocator& createSharedCounterPool();
 
-        FORCEINLINE SmallObjectAllocator& getSharedCounterPool()
+        ORX_FORCEINLINE SmallObjectAllocator& getSharedCounterPool()
         {
             static SmallObjectAllocator& instance = createSharedCounterPool();
Index: code/trunk/src/libraries/util/SignalHandler.cc
===================================================================
--- code/trunk/src/libraries/util/SignalHandler.cc	(revision 8267)
+++ code/trunk/src/libraries/util/SignalHandler.cc	(revision 8351)
@@ -37,4 +37,5 @@
 #include <cstdlib>
 #include <cstring>
+#include <cstdio>
 
 #include "Debug.h"
Index: code/trunk/src/libraries/util/SignalHandler.h
===================================================================
--- code/trunk/src/libraries/util/SignalHandler.h	(revision 8267)
+++ code/trunk/src/libraries/util/SignalHandler.h	(revision 8351)
@@ -70,5 +70,5 @@
 
     /// The SignalHandler is used to catch signals like SIGSEGV and write a backtrace to the logfile.
-    class SignalHandler : public Singleton<SignalHandler>
+    class _UtilExport SignalHandler : public Singleton<SignalHandler>
     {
         friend class Singleton<SignalHandler>;
Index: code/trunk/src/libraries/util/UtilPrereqs.h
===================================================================
--- code/trunk/src/libraries/util/UtilPrereqs.h	(revision 8267)
+++ code/trunk/src/libraries/util/UtilPrereqs.h	(revision 8351)
@@ -52,8 +52,11 @@
 #    endif
 #  endif
-#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _UtilPrivate
+#elif defined (ORXONOX_GCC_VISIBILITY)
 #  define _UtilExport  __attribute__ ((visibility("default")))
+#  define _UtilPrivate __attribute__ ((visibility("hidden")))
 #else
 #  define _UtilExport
+#  define _UtilPrivate
 #endif
 
