pkgsrc-WIP-changes archive

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

rdsn-git: Add initial NetBSD support patches



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sat Feb 27 20:53:07 2016 +0100
Changeset:	845625c20098cf22bc7cf22a0d8ace6eea55d7b3

Modified Files:
	rdns-git/distinfo
Added Files:
	rdns-git/patches/patch-include_dsn_internal_ports.h
	rdns-git/patches/patch-src_dev_cpp_file__utils.cpp
	rdns-git/patches/patch-src_dev_cpp_utils.cpp

Log Message:
rdsn-git: Add initial NetBSD support patches

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

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

diffstat:
 rdns-git/distinfo                                  |  3 ++
 .../patches/patch-include_dsn_internal_ports.h     | 18 +++++++++
 rdns-git/patches/patch-src_dev_cpp_file__utils.cpp | 45 ++++++++++++++++++++++
 rdns-git/patches/patch-src_dev_cpp_utils.cpp       | 31 +++++++++++++++
 4 files changed, 97 insertions(+)

diffs:
diff --git a/rdns-git/distinfo b/rdns-git/distinfo
index 7931384..7a7c6c9 100644
--- a/rdns-git/distinfo
+++ b/rdns-git/distinfo
@@ -12,3 +12,6 @@ Size (libcxx-3.6.2.src.tar.xz) = 944020 bytes
 SHA1 (llvm-3.6.2.src.tar.xz) = 7a00257eb2bc9431e4c77c3a36b033072c54bc7e
 RMD160 (llvm-3.6.2.src.tar.xz) = 521cbc5fe2925ea3c6e90c7a31f752a04045c972
 Size (llvm-3.6.2.src.tar.xz) = 12802380 bytes
+SHA1 (patch-include_dsn_internal_ports.h) = ded80af0cad9a718dc226be2aef24c194d7ba0ad
+SHA1 (patch-src_dev_cpp_file__utils.cpp) = 53c12e7167b329aa65922bc3df83cbcf8102c832
+SHA1 (patch-src_dev_cpp_utils.cpp) = 7574b9489f874817690ac28a4a84b346b2b877c0
diff --git a/rdns-git/patches/patch-include_dsn_internal_ports.h b/rdns-git/patches/patch-include_dsn_internal_ports.h
new file mode 100644
index 0000000..72daaf1
--- /dev/null
+++ b/rdns-git/patches/patch-include_dsn_internal_ports.h
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- include/dsn/internal/ports.h.orig	2016-02-27 19:03:52.000000000 +0000
++++ include/dsn/internal/ports.h
+@@ -44,7 +44,7 @@ __pragma(warning(disable:4127))
+ # define __thread __declspec(thread)
+ # define __selectany __declspec(selectany) extern 
+ 
+-# elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
++# elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
+ 
+ # include <unistd.h>
+ 
+@@ -120,4 +120,3 @@ namespace dsn 
+ # define snprintf_p std::snprintf
+ # endif
+ # endif
+-
diff --git a/rdns-git/patches/patch-src_dev_cpp_file__utils.cpp b/rdns-git/patches/patch-src_dev_cpp_file__utils.cpp
new file mode 100644
index 0000000..7af515f
--- /dev/null
+++ b/rdns-git/patches/patch-src_dev_cpp_file__utils.cpp
@@ -0,0 +1,45 @@
+$NetBSD$
+
+--- src/dev/cpp/file_utils.cpp.orig	2016-02-27 19:03:52.000000000 +0000
++++ src/dev/cpp/file_utils.cpp
+@@ -76,7 +76,11 @@
+ 
+ # if defined(__APPLE__)
+ # include <libproc.h>
+-#endif
++# endif
++
++# if defined(__NetBSD__)
++# include <sys/sysctl.h>
++# endif
+ 
+ # define getcwd_ getcwd
+ # define rmdir_ rmdir
+@@ -1102,6 +1106,27 @@ out_error:
+                 }
+ 
+                 path = tls_path_buffer;
++# elif defined(__NetBSD__)
++                if (pid == -1)
++                {
++                    pid = ::getpid();
++                }
++
++#ifdef KERN_PROC_PATHNAME
++                static const int name[] = {
++                    CTL_KERN, KERN_PROC_ARGS, pid, KERN_PROC_PATHNAME,
++                };
++
++                size_t len = TLS_PATH_BUFFER_SIZE;
++                if (sysctl(name, __arraycount(name), tls_path_buffer, &len, NULL, 0) == -1)
++                {
++                    return ERR_PATH_NOT_FOUND;
++                }
++
++                path = tls_path_buffer;
++#else
++# error not implemented yet
++#endif
+ # else
+ # error not implemented yet
+ # endif
diff --git a/rdns-git/patches/patch-src_dev_cpp_utils.cpp b/rdns-git/patches/patch-src_dev_cpp_utils.cpp
new file mode 100644
index 0000000..37fa723
--- /dev/null
+++ b/rdns-git/patches/patch-src_dev_cpp_utils.cpp
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- src/dev/cpp/utils.cpp.orig	2016-02-27 19:03:52.000000000 +0000
++++ src/dev/cpp/utils.cpp
+@@ -45,6 +45,8 @@
+ # include <sys/thr.h>
+ # elif defined(__APPLE__)
+ # include <pthread.h>
++# elif defined(__NetBSD__)
++# include <lwp.h>
+ # endif
+ 
+ # ifdef __TITLE__
+@@ -69,6 +71,8 @@ namespace dsn {
+             return static_cast<int>(lwpid);
+ # elif defined(__APPLE__)
+             return static_cast<int>(pthread_mach_thread_np(pthread_self()));
++# elif defined(__NetBSD__)
++            return static_cast<int>(_lwp_self());
+ # else
+ # error not implemented yet
+ # endif 
+@@ -506,8 +510,3 @@ namespace  dsn 
+         return true;
+     }
+ } // end namespace dsn
+-
+-
+-
+-
+-


Home | Main Index | Thread Index | Old Index