Sophie

Sophie

distrib > Mandriva > 2008.1 > i586 > media > main-release-src > by-pkgid > 7773e0f0d55a66feabd2251714baeaf5 > files > 3

java-1.7.0-icedtea-1.7.0.0-24.614.2mdv2008.1.src.rpm

diff -r 92489cdc94d1 src/os/linux/vm/jvm_linux.cpp
--- a/src/os/linux/vm/jvm_linux.cpp	Tue Dec 04 16:28:18 2007 -0800
+++ b/src/os/linux/vm/jvm_linux.cpp	Thu Dec 27 12:05:09 2007 +0200
@@ -132,7 +132,7 @@ JVM_END
 */
 
 struct siglabel {
-  char *name;
+  const char *name;
   int   number;
 };
 
diff -r 92489cdc94d1 src/os/linux/vm/os_linux.cpp
--- a/src/os/linux/vm/os_linux.cpp	Tue Dec 04 16:28:18 2007 -0800
+++ b/src/os/linux/vm/os_linux.cpp	Thu Dec 27 12:05:09 2007 +0200
@@ -76,7 +76,8 @@ bool os::Linux::_is_NPTL = false;
 bool os::Linux::_is_NPTL = false;
 bool os::Linux::_supports_fast_thread_cpu_time = false;
 char * os::Linux::_glibc_version = NULL;
-char * os::Linux::_libpthread_version = NULL;
+// glibc before 2.3.2 only has LinuxThreads so use it as the default
+const char * os::Linux::_libpthread_version = "linuxthreads";
 
 static jlong initial_time_count=0;
 
@@ -199,7 +200,7 @@ pid_t os::Linux::gettid() {
 // the system call returns 1.  This causes the VM to act as if it is
 // a single processor and elide locking (see is_MP() call).
 static bool unsafe_chroot_detected = false;
-static char *unstable_chroot_error = "/proc file system not found.\n"
+static const char *unstable_chroot_error = "/proc file system not found.\n"
               "Java may be unstable running multithreaded in a chroot "
               "environment on Linux when /proc filesystem is not mounted.";
 
@@ -543,13 +544,9 @@ void os::Linux::libpthread_init() {
         // NPTL:
         if (sysconf(_SC_THREAD_THREADS_MAX) > 0) {
            free(str);
-           str = "linuxthreads";
         }
      }
      os::Linux::set_libpthread_version(str);
-  } else {
-     // glibc before 2.3.2 only has LinuxThreads.
-     os::Linux::set_libpthread_version("linuxthreads");
   }
 
   if (strstr(libpthread_version(), "NPTL")) {
@@ -4526,7 +4523,7 @@ extern char** environ;
 // Unlike system(), this function can be called from signal handler. It
 // doesn't block SIGINT et al.
 int os::fork_and_exec(char* cmd) {
-  char * argv[4];
+  const char * argv[4];
   argv[0] = "sh";
   argv[1] = "-c";
   argv[2] = cmd;
diff -r 92489cdc94d1 src/os/linux/vm/os_linux.hpp
--- a/src/os/linux/vm/os_linux.hpp	Tue Dec 04 16:28:18 2007 -0800
+++ b/src/os/linux/vm/os_linux.hpp	Thu Dec 27 12:05:09 2007 +0200
@@ -53,7 +53,7 @@ class Linux {
   static uintptr_t _initial_thread_stack_size;
 
   static char *_glibc_version;
-  static char *_libpthread_version;
+  static const char *_libpthread_version;
 
   static bool _is_floating_stack;
   static bool _is_NPTL;
@@ -71,7 +71,7 @@ class Linux {
   static void initialize_system_info();
 
   static void set_glibc_version(char *s)      { _glibc_version = s; }
-  static void set_libpthread_version(char *s) { _libpthread_version = s; }
+  static void set_libpthread_version(const char *s) { _libpthread_version = s; }
 
   static bool supports_variable_stack_size();
 
@@ -132,7 +132,7 @@ class Linux {
 
   // GNU libc and libpthread version strings
   static char *glibc_version()                { return _glibc_version; }
-  static char *libpthread_version()           { return _libpthread_version; }
+  static const char *libpthread_version()           { return _libpthread_version; }
 
   // NPTL or LinuxThreads?
   static bool is_LinuxThreads()               { return !_is_NPTL; }
diff -r 92489cdc94d1 src/share/vm/ci/ciMethodBlocks.cpp
--- a/src/share/vm/ci/ciMethodBlocks.cpp	Tue Dec 04 16:28:18 2007 -0800
+++ b/src/share/vm/ci/ciMethodBlocks.cpp	Thu Dec 27 12:05:09 2007 +0200
@@ -318,7 +318,7 @@ void ciBlock::set_exception_range(int st
 }
 
 #ifndef PRODUCT
-static char *flagnames[] = {
+static const char *flagnames[] = {
   "Processed",
   "Handler",
   "MayThrow",
diff -r 92489cdc94d1 src/share/vm/opto/escape.cpp
--- a/src/share/vm/opto/escape.cpp	Tue Dec 04 16:28:18 2007 -0800
+++ b/src/share/vm/opto/escape.cpp	Thu Dec 27 12:05:09 2007 +0200
@@ -51,21 +51,21 @@ void PointsToNode::remove_edge(uint targ
 }
 
 #ifndef PRODUCT
-static char *node_type_names[] = {
+static const char *node_type_names[] = {
   "UnknownType",
   "JavaObject",
   "LocalVar",
   "Field"
 };
 
-static char *esc_names[] = {
+static const char *esc_names[] = {
   "UnknownEscape",
   "NoEscape     ",
   "ArgEscape    ",
   "GlobalEscape "
 };
 
-static char *edge_type_suffix[] = {
+static const char *edge_type_suffix[] = {
  "?", // UnknownEdge
  "P", // PointsToEdge
  "D", // DeferredEdge