pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

coreclr-git: Get realpath(PID) on NetBSD



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Tue Apr 12 03:02:45 2016 +0200
Changeset:	b999e5a1834f0a0b44d3da915ce07187bbd94bf9

Modified Files:
	coreclr-git/distinfo
	coreclr-git/patches/patch-src_pal_src_arch_i386_hardwareexceptionhelper.S
Added Files:
	coreclr-git/patches/patch-src_coreclr_hosts_unixcoreruncommon_coreruncommon.cpp

Log Message:
coreclr-git: Get realpath(PID) on NetBSD

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=b999e5a1834f0a0b44d3da915ce07187bbd94bf9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 coreclr-git/distinfo                               |  3 +-
 ...reclr_hosts_unixcoreruncommon_coreruncommon.cpp | 42 ++++++++++++++++++++++
 ...src_pal_src_arch_i386_hardwareexceptionhelper.S |  2 +-
 3 files changed, 45 insertions(+), 2 deletions(-)

diffs:
diff --git a/coreclr-git/distinfo b/coreclr-git/distinfo
index b315d43..378e10a 100644
--- a/coreclr-git/distinfo
+++ b/coreclr-git/distinfo
@@ -1,8 +1,9 @@
 $NetBSD$
 
+SHA1 (patch-src_coreclr_hosts_unixcoreruncommon_coreruncommon.cpp) = 146372d15f157088d450d4cd37cd2aac590e6d06
 SHA1 (patch-src_pal_inc_pal.h) = 7d3ef148af8b1b24067ba4cb5efc12581ebc6881
 SHA1 (patch-src_pal_src_CMakeLists.txt) = 5266c31034534c7ffd4e770c8c5c4712d3743f71
-SHA1 (patch-src_pal_src_arch_i386_hardwareexceptionhelper.S) = bd9e5e5c62138c40c17bdb8f6ac708ff73dd1fba
+SHA1 (patch-src_pal_src_arch_i386_hardwareexceptionhelper.S) = ead979268029bacaadccd78199216e01c50f503e
 SHA1 (patch-src_pal_src_cruntime_printf.cpp) = 8a86c57e1fe3953d158e1860f04bd19d7df1fe08
 SHA1 (patch-src_pal_src_cruntime_printfcpp.cpp) = 4d1ba5fea45402259c67428506f39d9c3128ecbd
 SHA1 (patch-src_pal_src_cruntime_silent__printf.cpp) = 0922321ad05a90cc3b87b1e2663ff4d0b2e4717e
diff --git a/coreclr-git/patches/patch-src_coreclr_hosts_unixcoreruncommon_coreruncommon.cpp b/coreclr-git/patches/patch-src_coreclr_hosts_unixcoreruncommon_coreruncommon.cpp
new file mode 100644
index 0000000..d79e6fb
--- /dev/null
+++ b/coreclr-git/patches/patch-src_coreclr_hosts_unixcoreruncommon_coreruncommon.cpp
@@ -0,0 +1,42 @@
+$NetBSD$
+
+--- src/coreclr/hosts/unixcoreruncommon/coreruncommon.cpp.orig	2016-04-08 23:29:23.000000000 +0000
++++ src/coreclr/hosts/unixcoreruncommon/coreruncommon.cpp
+@@ -16,6 +16,7 @@
+ #include <string>
+ #include <string.h>
+ #include <sys/stat.h>
++#include <sys/sysctl.h>
+ #include "coreruncommon.h"
+ #include "coreclrhost.h"
+ #include <unistd.h>
+@@ -45,7 +46,7 @@ bool GetEntrypointExecutableAbsolutePath
+ 
+     // Get path to the executable for the current process using
+     // platform specific means.
+-#if defined(__linux__)
++#if defined(__linux__) || (defined(__NetBSD__) && !defined(KERN_PROC_PATHNAME))
+     // On Linux, fetch the entry point EXE absolute path, inclusive of filename.
+     char exe[PATH_MAX];
+     ssize_t res = readlink(symlinkEntrypointExecutable, exe, PATH_MAX - 1);
+@@ -75,6 +76,20 @@ bool GetEntrypointExecutableAbsolutePath
+             result = true;
+         }
+     }
++#elif defined(__NetBSD__) && defined(KERN_PROC_PATHNAME)
++    static const int name[] = {
++        CTL_KERN, KERN_PROC_ARGS, -1, KERN_PROC_PATHNAME,
++    };
++    char path[MAXPATHLEN];
++    size_t len;
++
++    len = sizeof(path);
++    if (sysctl(name, __arraycount(name), path, &len, NULL, 0) != -1) {
++        entrypointExecutable.assign(path);
++        result = true;
++    } else {
++        result = false;
++    }
+ #else
+     // On non-Mac OS, return the symlink that will be resolved by GetAbsolutePath
+     // to fetch the entrypoint EXE absolute path, inclusive of filename.
diff --git a/coreclr-git/patches/patch-src_pal_src_arch_i386_hardwareexceptionhelper.S b/coreclr-git/patches/patch-src_pal_src_arch_i386_hardwareexceptionhelper.S
index cfa3ee3..0c1edee 100644
--- a/coreclr-git/patches/patch-src_pal_src_arch_i386_hardwareexceptionhelper.S
+++ b/coreclr-git/patches/patch-src_pal_src_arch_i386_hardwareexceptionhelper.S
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- src/pal/src/arch/i386/hardwareexceptionhelper.S.orig	2016-04-11 23:49:52.040000054 +0000
+--- src/pal/src/arch/i386/hardwareexceptionhelper.S.orig	2016-04-11 23:52:49.565908655 +0000
 +++ src/pal/src/arch/i386/hardwareexceptionhelper.S
 @@ -0,0 +1,46 @@
 +// Licensed to the .NET Foundation under one or more agreements.


Home | Main Index | Thread Index | Old Index