summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Jones <cretin@gentoo.org>2003-04-15 13:51:16 +0000
committerStefan Jones <cretin@gentoo.org>2003-04-15 13:51:16 +0000
commit605d460fbe71b11c924af7b11b5b1a9eaaf28976 (patch)
treeaae73a2564a20c0de00175edcc807d9493c275be /dev-java/sun-j2sdk
parentpatch for errno #17744 (diff)
downloadgentoo-2-605d460fbe71b11c924af7b11b5b1a9eaaf28976.tar.gz
gentoo-2-605d460fbe71b11c924af7b11b5b1a9eaaf28976.tar.bz2
gentoo-2-605d460fbe71b11c924af7b11b5b1a9eaaf28976.zip
Patch so it should compile with nptl
Diffstat (limited to 'dev-java/sun-j2sdk')
-rw-r--r--dev-java/sun-j2sdk/ChangeLog5
-rw-r--r--dev-java/sun-j2sdk/files/1.4.1/j2sdk-1.4.1-pthread.patch36
-rw-r--r--dev-java/sun-j2sdk/sun-j2sdk-1.4.1.ebuild6
3 files changed, 44 insertions, 3 deletions
diff --git a/dev-java/sun-j2sdk/ChangeLog b/dev-java/sun-j2sdk/ChangeLog
index 6fc1060976df..e6fdbbaa34e3 100644
--- a/dev-java/sun-j2sdk/ChangeLog
+++ b/dev-java/sun-j2sdk/ChangeLog
@@ -1,10 +1,13 @@
# ChangeLog for dev-java/sun-j2sdk
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-j2sdk/ChangeLog,v 1.14 2003/02/12 05:54:48 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-j2sdk/ChangeLog,v 1.15 2003/04/15 13:51:16 cretin Exp $
06 Dec 2002; Rodney Rees <manson@gentoo.org> : changed sparc ~sparc keywords
*sun-j2sdk-1.4.1 (12 Jan 2003)
+ 15 Apr 2003; Stefan Jones <cretin@gentoo.org>:
+ Added patch so it compiles with nptl
+
13 Jan 2003; Stefan Jones <cretin@gentoo.org>:
Changed motif patch so it doesn't block motif and upped the CFLAGS
diff --git a/dev-java/sun-j2sdk/files/1.4.1/j2sdk-1.4.1-pthread.patch b/dev-java/sun-j2sdk/files/1.4.1/j2sdk-1.4.1-pthread.patch
new file mode 100644
index 000000000000..5fc9e3970323
--- /dev/null
+++ b/dev-java/sun-j2sdk/files/1.4.1/j2sdk-1.4.1-pthread.patch
@@ -0,0 +1,36 @@
+--- j2sdk.orig/hotspot/src/os/linux/vm/os_linux.cpp.jj 2003-01-17 12:00:05.000000000 +0000
++++ j2sdk.orig/hotspot/src/os/linux/vm/os_linux.cpp 2003-01-17 14:06:00.000000000 +0000
+@@ -1012,9 +1012,6 @@
+ if (dump_core) {
+ NOT_PRODUCT(tty->print("Current thread is %p\n", pthread_self()));
+ NOT_PRODUCT(tty->print("Dumping core ...\n"));
+- // 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
+ }
+ ::exit(1);
+@@ -1716,12 +1713,7 @@
+ 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;
+ }
+--- j2sdk.orig/j2se/src/solaris/native/sun/nio/ch/NativeThread.c.jj 2003-01-17 17:00:47.000000000 +0000
++++ j2sdk.orig/j2se/src/solaris/native/sun/nio/ch/NativeThread.c 2003-01-17 17:01:54.000000000 +0000
+@@ -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
+ }
diff --git a/dev-java/sun-j2sdk/sun-j2sdk-1.4.1.ebuild b/dev-java/sun-j2sdk/sun-j2sdk-1.4.1.ebuild
index a8ce459ffdac..80203df3414c 100644
--- a/dev-java/sun-j2sdk/sun-j2sdk-1.4.1.ebuild
+++ b/dev-java/sun-j2sdk/sun-j2sdk-1.4.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-j2sdk/sun-j2sdk-1.4.1.ebuild,v 1.6 2003/02/25 14:03:59 cretin Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-j2sdk/sun-j2sdk-1.4.1.ebuild,v 1.7 2003/04/15 13:51:16 cretin Exp $
# Maintainer: Stefan Jones <cretin@gentoo.org>
# Author: Stefan Jones <cretin@gentoo.org>
@@ -8,7 +8,7 @@
# Based on http://www.linuxfromscratch.org/~tushar/hints/javafromscratch.txt (LFS)
# By Tushar Teredesai <Tush@Yahoo.Com>
-IUSE=""
+IUSE="nptl"
inherit java nsplugins
@@ -90,6 +90,8 @@ src_unpack() {
cd mozilla
unpack ${SRC_MOZHEADERS}
+ use nptl && JAVA_PATCHES="$JAVA_PATCHES pthread"
+
cd ${S}
for patch in $JAVA_PATCHES ; do
einfo "Applying patch ${patch}"