From 371e6b4b5ca3bcab33514c757c2d0ec4488ea1e5 Mon Sep 17 00:00:00 2001 From: Alexey Zelkin Date: Tue, 11 Nov 2003 16:16:20 +0000 Subject: Update to 1.4.2p5. Important changes since last patchset: . jdk14 port is now JDK 1.4.2 based! . JavaWS distributing with jdk . Runway problem fixed (fork() is no more problem for java apps) . Sound support updated . IPv6 support overhauled . Drag'n'Drop support fixed (require open-motif mods) As for now there's no more outstanding issues with this port! FreeBSD port is also got a important of changes: . optimized setup is now default (to get debuging bins/libs use WITH_DEBUG) . bootstrap jdk autodetection. If WITH_LINUX_BOOTSTRAP is not set, then it checks all known to work JDKs installed. If nothing found, forces to install of linux-sun-jdk14 . Because of above change there's no NATIVE_BOOTSTRAP option anymore. If native jdk14 is installed, it will be used by default. --- java/jdk16/files/patch-UNIXProcess_md.c.bsd | 93 ----------------------------- 1 file changed, 93 deletions(-) delete mode 100644 java/jdk16/files/patch-UNIXProcess_md.c.bsd (limited to 'java/jdk16/files/patch-UNIXProcess_md.c.bsd') diff --git a/java/jdk16/files/patch-UNIXProcess_md.c.bsd b/java/jdk16/files/patch-UNIXProcess_md.c.bsd deleted file mode 100644 index d9ec95eefa7c..000000000000 --- a/java/jdk16/files/patch-UNIXProcess_md.c.bsd +++ /dev/null @@ -1,93 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/src/solaris/native/java/lang/UNIXProcess_md.c.bsd.orig Wed Oct 29 12:22:58 2003 -+++ ../../j2se/src/solaris/native/java/lang/UNIXProcess_md.c.bsd Wed Oct 29 12:23:33 2003 -@@ -22,6 +22,12 @@ - #include - #include - -+#if defined(__FreeBSD__) -+#include -+#include -+#include -+#endif -+ - /* path in the environment */ - static char **PATH = 0; - /* effective uid */ -@@ -228,6 +234,61 @@ - } - } - -+#if defined(__FreeBSD__) -+ -+extern pid_t __sys_fork(void); -+ -+static pid_t -+jdk_fork_wrapper() -+{ -+ pid_t resultPid; -+#if (__FreeBSD_version < 5) -+ static int is_libc_r = -1; -+ void *funcref; -+ -+ if (is_libc_r == -1) { -+ is_libc_r = 1; -+ -+ /* -+ * BSDNOTE: Check for loaded symbols. -+ * -+ * If "_thr_critical_enter" is found assume we are using 'libthr'. -+ * If _kse_critical_enter is found assume we are using 'libkse'. -+ * Otherwise we are using libc_r. -+ * -+ * If libc_r is loaded, use fork system call drectly to avoid -+ * problems with using protected pages. -+ * -+ * --phantom -+ */ -+ funcref = dlsym(RTLD_DEFAULT, "_kse_critical_enter"); -+ if (funcref != NULL) -+ is_libc_r = 0; -+ else { -+ funcref = dlsym(RTLD_DEFAULT, "_thr_critical_enter"); -+ if (funcref != NULL) -+ is_libc_r = 0; -+ } -+ } -+ -+ if (is_libc_r == 0) { -+ /* Not a libc_r */ -+ resultPid = fork(); -+ } else { -+#endif /* __FreeBSD_version < 5 */ -+ pthread_suspend_all_np(); -+ resultPid = __sys_fork(); -+ if (resultPid != 0) -+ /* leave child in single threading mode */ -+ pthread_resume_all_np(); -+#if (__FreeBSD_version < 5) -+ } -+#endif /* __FreeBSD_version < 5 */ -+ -+ return resultPid; -+} -+#endif /* __FreeBSD__ */ -+ - JNIEXPORT jint JNICALL - Java_java_lang_UNIXProcess_forkAndExec(JNIEnv *env, - jobject process, -@@ -335,8 +396,12 @@ - if (path != NULL) { - cwd = (char *)JNU_GetStringPlatformChars(env, path, NULL); - } -- -+ -+#if defined(__FreeBSD__) -+ resultPid = jdk_fork_wrapper(); -+#else - resultPid = fork(); -+#endif - - if (resultPid < 0) { - char errmsg[128]; -- cgit v1.2.3