Import of pkgsrc-2014Q1

This commit is contained in:
2014-11-05 12:41:07 +01:00
parent 785076ae39
commit 9a8c06dafb
19365 changed files with 828089 additions and 278039 deletions
@@ -1,8 +1,8 @@
$NetBSD: patch-libutil_sysutil.cpp,v 1.1 2012/12/03 12:54:15 ryoon Exp $
$NetBSD: patch-libutil_sysutil.cpp,v 1.2 2013/10/12 22:13:44 ryoon Exp $
* Treat NetBSD like Linux (I am not sure)
--- libutil/sysutil.cpp.orig 2012-11-16 23:02:42.000000000 +0000
--- libutil/sysutil.cpp.orig 2013-09-30 17:25:21.000000000 +0000
+++ libutil/sysutil.cpp
@@ -39,7 +39,7 @@
# include <sys/ioctl.h>
@@ -14,11 +14,11 @@ $NetBSD: patch-libutil_sysutil.cpp,v 1.1 2012/12/03 12:54:15 ryoon Exp $
# include <sys/resource.h>
# include <sys/sysctl.h>
@@ -150,7 +150,7 @@ Sysutil::this_program_path ()
char filename[10240];
filename[0] = 0;
unsigned int size = sizeof(filename);
-#if defined(__linux__)
+#if defined(__linux__) || defined(__NetBSD__)
unsigned int size = sizeof(filename);
int r = readlink ("/proc/self/exe", filename, size);
ASSERT(r < int(size)); // user won't get the right answer if the filename is too long to store
if (r > 0) filename[r] = 0; // readlink does not fill in the 0 byte