summaryrefslogtreecommitdiff
path: root/java/openjdk7/files/patch-src-solaris-bin-java_md_solinux.c
diff options
context:
space:
mode:
authorGreg Lewis <glewis@FreeBSD.org>2020-03-08 16:52:57 +0000
committerGreg Lewis <glewis@FreeBSD.org>2020-03-08 16:52:57 +0000
commitfb717d0e60d518f1df0a66b382e11ff5a1d0f53b (patch)
tree2233da93deb1f7ec987240f5e3c7ef103d53e0d3 /java/openjdk7/files/patch-src-solaris-bin-java_md_solinux.c
parentx11-toolkits/scintilla & editors/scite: Update to 4.3.0 (diff)
Update to 7u251
Notes
Notes: svn path=/head/; revision=528057
Diffstat (limited to 'java/openjdk7/files/patch-src-solaris-bin-java_md_solinux.c')
-rw-r--r--java/openjdk7/files/patch-src-solaris-bin-java_md_solinux.c58
1 files changed, 0 insertions, 58 deletions
diff --git a/java/openjdk7/files/patch-src-solaris-bin-java_md_solinux.c b/java/openjdk7/files/patch-src-solaris-bin-java_md_solinux.c
deleted file mode 100644
index 067ee2128002..000000000000
--- a/java/openjdk7/files/patch-src-solaris-bin-java_md_solinux.c
+++ /dev/null
@@ -1,58 +0,0 @@
---- jdk/src/solaris/bin/java_md_solinux.c.orig
-+++ jdk/src/solaris/bin/java_md_solinux.c
-@@ -35,6 +35,9 @@
- #include <sys/stat.h>
- #include <unistd.h>
- #include <sys/types.h>
-+#ifdef __FreeBSD__
-+#include <sys/sysctl.h>
-+#endif
- #include "manifest_info.h"
- #include "version_comp.h"
-
-@@ -899,9 +902,9 @@
- * onwards the filename returned in DL_info structure from dladdr is
- * an absolute pathname so technically realpath isn't required.
- * On Linux we read the executable name from /proc/self/exe.
-- * On *BSD we read the executable name from /proc/curproc/file.
-+ * On FreeBSD, we get the executable name via sysctl(3).
- * As a fallback, and for platforms other than Solaris, Linux, and
-- * *BSD, we use FindExecName to compute the executable name.
-+ * FreeBSD, we use FindExecName to compute the executable name.
- */
- const char*
- SetExecname(char **argv)
-@@ -928,13 +931,9 @@
- }
- }
- }
--#elif defined(__linux__) || defined(_ALLBSD_SOURCE)
-+#elif defined(__linux__)
- {
--#if defined(_ALLBSD_SOURCE)
-- const char* self = "/proc/curproc/file";
--#else
- const char* self = "/proc/self/exe";
--#endif
- char buf[PATH_MAX+1];
- int len = readlink(self, buf, PATH_MAX);
- if (len >= 0) {
-@@ -942,7 +941,17 @@
- exec_path = JLI_StringDup(buf);
- }
- }
--#else /* !__solaris__ && !__linux__ && !_ALLBSD_SOURCE */
-+#elif defined(__FreeBSD__)
-+ {
-+ char buf[PATH_MAX+1];
-+ int name[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
-+ size_t len = sizeof(buf);
-+ if (sysctl(name, 4, buf, &len, NULL, 0) == 0 && len > 0) {
-+ buf[len] = '\0';
-+ exec_path = JLI_StringDup(buf);
-+ }
-+ }
-+#else /* !__sun && !__linux && !__FreeBSD__ */
- {
- /* Not implemented */
- }