[vmkit-commits] [vmkit] r69445 - in /vmkit/trunk: lib/JnJVM/VMCore/Jnjvm.cpp lib/JnJVM/VMCore/JnjvmClassLoader.cpp lib/N3/VMCore/VMClass.h tools/llcj/llcj.cpp tools/vmkit/Launcher.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Sat Apr 18 06:36:46 PDT 2009


Author: geoffray
Date: Sat Apr 18 08:36:34 2009
New Revision: 69445

URL: http://llvm.org/viewvc/llvm-project?rev=69445&view=rev
Log:
Fix compilation with gcc3.4 and gcc4.4. Patch by Xerxes Ranby!


Modified:
    vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp
    vmkit/trunk/lib/JnJVM/VMCore/JnjvmClassLoader.cpp
    vmkit/trunk/lib/N3/VMCore/VMClass.h
    vmkit/trunk/tools/llcj/llcj.cpp
    vmkit/trunk/tools/vmkit/Launcher.cpp

Modified: vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp?rev=69445&r1=69444&r2=69445&view=diff

==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp Sat Apr 18 08:36:34 2009
@@ -512,7 +512,7 @@
 }
 
 extern "C" int sys_strnstr(const char *haystack, const char *needle) {
-  char * res = strstr(haystack, needle);
+  char * res = (char*)strstr(haystack, needle);
   if (res) return res - haystack;
   else return -1; 
 }

Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmClassLoader.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmClassLoader.cpp?rev=69445&r1=69444&r2=69445&view=diff

==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JnjvmClassLoader.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmClassLoader.cpp Sat Apr 18 08:36:34 2009
@@ -996,7 +996,7 @@
                                       const char* file) {
 
   char* soName = (char*)alloca(strlen(name) + strlen(DYLD_EXTENSION));
-  char* ptr = strrchr(name, '/');
+  char* ptr = (char*)strrchr(name, '/');
   sprintf(soName, "%s%s", ptr ? ptr + 1 : name, DYLD_EXTENSION);
   void* handle = dlopen(soName, RTLD_LAZY | RTLD_LOCAL);
   if (handle) {

Modified: vmkit/trunk/lib/N3/VMCore/VMClass.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/VMClass.h?rev=69445&r1=69444&r2=69445&view=diff

==============================================================================
--- vmkit/trunk/lib/N3/VMCore/VMClass.h (original)
+++ vmkit/trunk/lib/N3/VMCore/VMClass.h Sat Apr 18 08:36:34 2009
@@ -21,6 +21,8 @@
 #include "llvm/Function.h"
 #include "llvm/Type.h"
 
+#include <cstdarg>
+
 namespace n3 {
 
 class ArraySInt32;

Modified: vmkit/trunk/tools/llcj/llcj.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tools/llcj/llcj.cpp?rev=69445&r1=69444&r2=69445&view=diff

==============================================================================
--- vmkit/trunk/tools/llcj/llcj.cpp (original)
+++ vmkit/trunk/tools/llcj/llcj.cpp Sat Apr 18 08:36:34 2009
@@ -14,6 +14,10 @@
 
 #include "LinkPaths.h"
 
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+
 using namespace llvm;
 
 int main(int argc, char **argv) {

Modified: vmkit/trunk/tools/vmkit/Launcher.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tools/vmkit/Launcher.cpp?rev=69445&r1=69444&r2=69445&view=diff

==============================================================================
--- vmkit/trunk/tools/vmkit/Launcher.cpp (original)
+++ vmkit/trunk/tools/vmkit/Launcher.cpp Sat Apr 18 08:36:34 2009
@@ -164,7 +164,7 @@
 #if WITH_N3
     mvm::CompilationUnit* CLICompiler = 
       mvm::VirtualMachine::initialiseCLIVM();
-    MyCl.vmlets["net"] = (mvm::VirtualMachine::createCLIVM);
+    MyCl.vmlets["net"] = (create_vm_t)(mvm::VirtualMachine::createCLIVM);
     MyCl.compilers["net"] = CLICompiler;
 #endif
     MyCl.start();





More information about the vmkit-commits mailing list