Submitted By:  DJ Lucas (dj_AT_lucasit_DOT_com)
Date:  2004-01-10
Initial Package Version: 1.4.2
Origin:  Suggestion from following url:
  https://listman.redhat.com/archives/phil-list/2003-January/msg00094.html
    And from gentoo portage availible here:
  http://gentoo.tiscali.nl/gentoo-portage/dev-java/sun-j2sdk/files/1.4.2/
Description:  Fixes trivila compile error with nptl.

$LastChangedBy: dj $
$Date: 2004-11-27 02:53:52 -0700 (Sat, 27 Nov 2004) $

diff -Naur j2sdk-orig/hotspot/src/os/linux/vm/os_linux.cpp j2sdk/hotspot/src/os/linux/vm/os_linux.cpp
--- j2sdk-orig/hotspot/src/os/linux/vm/os_linux.cpp	2003-09-10 20:40:25.000000000 -0500
+++ j2sdk/hotspot/src/os/linux/vm/os_linux.cpp	2004-01-10 20:59:22.814788848 -0600
@@ -582,9 +582,6 @@
     NOT_PRODUCT(tty->print("Current thread is %p\n", pthread_self()));
     NOT_PRODUCT(tty->print("Dumping core ...\n"));
     ostream_exit();
-    // 4450681 : kill all other threads before abort to make sure the 
-    // calling thread is the one that gets dumped in core file. 
-    pthread_kill_other_threads_np();
     ::abort(); // dump core
   }
   ostream_exit();
@@ -1337,13 +1334,7 @@
   /* Set up signal handler for suspend/resume */
   act.sa_flags = SA_RESTART|SA_SIGINFO;
   act.sa_handler = (void (*)(int)) SR_handler;
-  // SR_signum is blocked by default. 
-  // 4528190 - We also need to block pthread restart signal (32 on all
-  // supported Linux platforms). Note that LinuxThreads need to block
-  // this signal for all threads to work properly. So we don't have
-  // to use hard-coded signal number when setting up the mask.
   pthread_sigmask(SIG_BLOCK, NULL, &act.sa_mask);
-  assert(sigismember(&act.sa_mask, 32), "incompatible pthread library");
   if (sigaction(SR_signum, &act, 0) == -1) {
     return -1;
   }
diff -Naur j2sdk-orig/j2se/src/solaris/native/sun/nio/ch/NativeThread.c j2sdk/j2se/src/solaris/native/sun/nio/ch/NativeThread.c
--- j2sdk-orig/j2se/src/solaris/native/sun/nio/ch/NativeThread.c	2003-09-10 20:55:49.000000000 -0500
+++ j2sdk/j2se/src/solaris/native/sun/nio/ch/NativeThread.c	2004-01-10 21:01:27.267869104 -0600
@@ -66,7 +66,7 @@
 Java_sun_nio_ch_NativeThread_signal(JNIEnv *env, jclass cl, jlong thread)
 {
 #ifdef __linux__
-    if (pthread_kill((pthread_t)thread, INTERRUPT_SIGNAL))
+     if (pthread_kill((pthread_t)(unsigned long int)thread, INTERRUPT_SIGNAL))
 	JNU_ThrowIOExceptionWithLastError(env, "Thread signal failed");
 #endif
 }
