[opengtl-commits] [178] fix compilation for gcc 4.3

[ Thread Index | Date Index | More lists.tuxfamily.org/opengtl-commits Archives ]


Revision: 178
Author:   cyrille
Date:     2008-05-19 14:06:40 +0200 (Mon, 19 May 2008)

Log Message:
-----------
fix compilation for gcc 4.3

Modified Paths:
--------------
    trunk/OpenGTL/OpenCTL/OpenCTL/compiler/Compiler.cpp
    trunk/OpenGTL/OpenGTL/GTLCore/tests/TestValue.h
    trunk/OpenGTL/OpenGTL/GTLTest/Test.h
    trunk/OpenGTL/OpenShiva/tools/compiler/ShivaC.cpp
    trunk/OpenGTL/OpenShiva/tools/interpreter/Shiva.cpp


Modified: trunk/OpenGTL/OpenCTL/OpenCTL/compiler/Compiler.cpp
===================================================================
--- trunk/OpenGTL/OpenCTL/OpenCTL/compiler/Compiler.cpp	2008-05-19 11:42:49 UTC (rev 177)
+++ trunk/OpenGTL/OpenCTL/OpenCTL/compiler/Compiler.cpp	2008-05-19 12:06:40 UTC (rev 178)
@@ -25,6 +25,7 @@
 #include <sstream>
 #include <float.h>
 #include <cstdarg>
+#include <climits>
 
 // LLVM
 #include <llvm/InstrTypes.h>
@@ -141,23 +142,23 @@
   // Load the standard library
   GTLCore::String Error;
   bool notLoaded;
-  if (notLoaded = llvm::sys::DynamicLibrary::LoadLibraryPermanently("libctlstdlib.so", &Error)) {
+  if((notLoaded = llvm::sys::DynamicLibrary::LoadLibraryPermanently("libctlstdlib.so", &Error))) {
     OCTL_DEBUG( "Error opening 'libctlstdlib.so': " << Error );
     appendError( GTLCore::ErrorMessage(Error));
   }
 #ifdef _OPENCTL_CTL_STD_LIB_BUILD_DIR_
   if( notLoaded)
   {
-    if (notLoaded = llvm::sys::DynamicLibrary::LoadLibraryPermanently((GTLCore::String(_OPENCTL_CTL_STD_LIB_BUILD_DIR_) + "libctlstdlib.so").c_str(), &Error)) {
+    if((notLoaded = llvm::sys::DynamicLibrary::LoadLibraryPermanently((GTLCore::String(_OPENCTL_CTL_STD_LIB_BUILD_DIR_) + "libctlstdlib.so").c_str(), &Error))) {
       OCTL_DEBUG( "Error opening 'libctlstdlib.so': " << Error );
       appendError( GTLCore::ErrorMessage(Error));
     }
   }
 #endif
 #ifdef _OPENCTL_CTL_STD_LIB_BUILD_DIR_
-  if( notLoaded)
+  if(notLoaded)
   {
-    if (notLoaded = llvm::sys::DynamicLibrary::LoadLibraryPermanently((GTLCore::String(_OPENCTL_LIB_INSTALL_) + "libctlstdlib.so").c_str(), &Error)) {
+    if((notLoaded = llvm::sys::DynamicLibrary::LoadLibraryPermanently((GTLCore::String(_OPENCTL_LIB_INSTALL_) + "libctlstdlib.so").c_str(), &Error))) {
       OCTL_DEBUG( "Error opening 'libctlstdlib.so': " << Error );
       appendError( GTLCore::ErrorMessage(Error));
     }

Modified: trunk/OpenGTL/OpenGTL/GTLCore/tests/TestValue.h
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/tests/TestValue.h	2008-05-19 11:42:49 UTC (rev 177)
+++ trunk/OpenGTL/OpenGTL/GTLCore/tests/TestValue.h	2008-05-19 12:06:40 UTC (rev 178)
@@ -84,7 +84,7 @@
     }
     virtual void runTest()
     {
-      Value vui((uint)32);
+      Value vui((unsigned int)32);
       GTLTEST_CHECK_EQUAL( vui.asUnsignedInt32(), 32);
       GTLTEST_CHECK_NEAR_EQUAL( vui.asFloat(), 32.0);
       GTLTEST_CHECK_EQUAL( vui.asBoolean(), true);

Modified: trunk/OpenGTL/OpenGTL/GTLTest/Test.h
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLTest/Test.h	2008-05-19 11:42:49 UTC (rev 177)
+++ trunk/OpenGTL/OpenGTL/GTLTest/Test.h	2008-05-19 12:06:40 UTC (rev 178)
@@ -31,7 +31,7 @@
  * @ingroup GTLTest
  */
 #define GTLTEST_MAIN_BEGIN(testname) \
-  int main(char argc, char** argv) \
+  int main(int argc, char** argv) \
   { \
     GTLTest::Suite test(#testname); \
 

Modified: trunk/OpenGTL/OpenShiva/tools/compiler/ShivaC.cpp
===================================================================
--- trunk/OpenGTL/OpenShiva/tools/compiler/ShivaC.cpp	2008-05-19 11:42:49 UTC (rev 177)
+++ trunk/OpenGTL/OpenShiva/tools/compiler/ShivaC.cpp	2008-05-19 12:06:40 UTC (rev 178)
@@ -20,6 +20,7 @@
 // C++ Headers
 #include <iostream>
 #include <fstream>
+#include <cstdlib>
 
 // OpenShiva Headers
 #include <OpenShiva/Kernel.h>
@@ -45,7 +46,7 @@
 }
 #define ARG_IS(a,b) argv[ai] == GTLCore::String(a) or argv[ai] == GTLCore::String(b)
 
-int main(char argc, char** argv)
+int main(int argc, char** argv)
 {
   GTLCore::String fileName = "";
   GTLCore::String output = "";

Modified: trunk/OpenGTL/OpenShiva/tools/interpreter/Shiva.cpp
===================================================================
--- trunk/OpenGTL/OpenShiva/tools/interpreter/Shiva.cpp	2008-05-19 11:42:49 UTC (rev 177)
+++ trunk/OpenGTL/OpenShiva/tools/interpreter/Shiva.cpp	2008-05-19 12:06:40 UTC (rev 178)
@@ -20,6 +20,7 @@
 // C++ Headers
 #include <iostream>
 #include <fstream>
+#include <cstdlib>
 
 // OpenShiva Headers
 #include <OpenShiva/Debug.h>
@@ -44,7 +45,7 @@
 }
 #define ARG_IS(a,b) argv[ai] == GTLCore::String(a) or argv[ai] == GTLCore::String(b)
 
-int main(char argc, char** argv)
+int main(int argc, char** argv)
 {
   GTLCore::String fileName = "";
   GTLCore::String output = "";


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/