bugfix in url parsing for HTTP.java
[org.ibex.core.git] / src / org / ibex / plat / Linux.cc
index e62a9ba..37118c3 100644 (file)
@@ -1,7 +1,12 @@
+// IMPORTANT: inclusion order: always include gcjh'ed headers first, then superclass cc's, then system headers
+#undef file
 #include <stdint.h>
-#include "X11.cc"
-
+#include <java/lang/Class.h>
+#include <org/ibex/js/JS.h>
+#include <org/ibex/util/Log.h>
 #include <org/ibex/plat/Linux.h>
+#include "X11.cc"
+#include <stdint.h>
 
 // we love libgcj!
 extern const char **_Jv_argv;
@@ -9,16 +14,14 @@ extern int _Jv_argc;
 
 void org::ibex::plat::Linux::fixEnvironment() {
   // this wreaks havoc on gdb
-  /*
-    // see http://lists.debian.org/debian-glibc/2003/debian-glibc-200311/msg00647.html
-    const char* ld_assume_kernel = getenv("LD_ASSUME_KERNEL");
-    if (ld_assume_kernel == NULL || strcmp("2.4.1", ld_assume_kernel)) {
-        int result;
-        printf("respawning self (%s) with LD_ASSUME_KERNEL=2.4.1\n", _Jv_argv[0]);
-        setenv("LD_ASSUME_KERNEL", "2.4.1", 1);
-        result = execvp(_Jv_argv[0], (char* const*)((void*)_Jv_argv));
-        printf("execvp() failed with error code %d\n", result);
-       exit(-1);
-    }
-  */
+  // see http://lists.debian.org/debian-glibc/2003/debian-glibc-200311/msg00647.html
+  const char* ld_assume_kernel = getenv("LD_ASSUME_KERNEL");
+  if (ld_assume_kernel == NULL || strcmp("2.4.1", ld_assume_kernel)) {
+    int result;
+    printf("respawning self (%s) with LD_ASSUME_KERNEL=2.4.1\n", _Jv_argv[0]);
+    setenv("LD_ASSUME_KERNEL", "2.4.1", 1);
+    result = execvp(_Jv_argv[0], (char* const*)((void*)_Jv_argv));
+    printf("execvp() failed with error code %d\n", result);
+    exit(-1);
+  }
 }