pkgsrc-WIP-changes archive

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

rdsn-git: More draft patches for NetBSD



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sat Feb 27 21:28:58 2016 +0100
Changeset:	6ce2e41ff649788d85a9b76958f9812260e4e742

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

Log Message:
rdsn-git: More draft patches for NetBSD

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

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

diffstat:
 rdsn-git/distinfo                                  |  8 ++--
 .../patches/patch-include_dsn_internal_ports.h     |  2 +-
 .../patches/patch-src_core_core_library__utils.cpp | 45 ++++++++++++++++++++++
 .../patches/patch-src_core_core_task__worker.cpp   | 42 ++++++++++++++++++++
 rdsn-git/patches/patch-src_dev_cpp_file__utils.cpp |  2 +-
 rdsn-git/patches/patch-src_dev_cpp_utils.cpp       |  2 +-
 6 files changed, 95 insertions(+), 6 deletions(-)

diffs:
diff --git a/rdsn-git/distinfo b/rdsn-git/distinfo
index 7a7c6c9..ee61219 100644
--- a/rdsn-git/distinfo
+++ b/rdsn-git/distinfo
@@ -12,6 +12,8 @@ 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
+SHA1 (patch-include_dsn_internal_ports.h) = ccd24ba17720920ebafcb185bacd63952685c7fe
+SHA1 (patch-src_core_core_library__utils.cpp) = 72b92cf3d16b634ed19c44c5f56c65864054d365
+SHA1 (patch-src_core_core_task__worker.cpp) = 4250bf98519f38c6e4ef6319d697f201cd6502ce
+SHA1 (patch-src_dev_cpp_file__utils.cpp) = e1bec04a6857deded632f57e6d531d1a78b0418a
+SHA1 (patch-src_dev_cpp_utils.cpp) = 4cd5db8b3273bb5c24f8cf4c2d62877e4a8921a3
diff --git a/rdsn-git/patches/patch-include_dsn_internal_ports.h b/rdsn-git/patches/patch-include_dsn_internal_ports.h
index 72daaf1..71c891b 100644
--- a/rdsn-git/patches/patch-include_dsn_internal_ports.h
+++ b/rdsn-git/patches/patch-include_dsn_internal_ports.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- include/dsn/internal/ports.h.orig	2016-02-27 19:03:52.000000000 +0000
+--- include/dsn/internal/ports.h.orig	2016-02-27 19:59:48.000000000 +0000
 +++ include/dsn/internal/ports.h
 @@ -44,7 +44,7 @@ __pragma(warning(disable:4127))
  # define __thread __declspec(thread)
diff --git a/rdsn-git/patches/patch-src_core_core_library__utils.cpp b/rdsn-git/patches/patch-src_core_core_library__utils.cpp
new file mode 100644
index 0000000..29ce27e
--- /dev/null
+++ b/rdsn-git/patches/patch-src_core_core_library__utils.cpp
@@ -0,0 +1,45 @@
+$NetBSD$
+
+--- src/core/core/library_utils.cpp.orig	2016-02-27 19:59:48.000000000 +0000
++++ src/core/core/library_utils.cpp
+@@ -48,6 +48,8 @@
+ # elif defined(__APPLE__)
+ # include <pthread.h>
+ # include <dlfcn.h> 
++# elif defined(__NetBSD__)
++# include <dlfcn.h> 
+ # endif
+ 
+ # ifdef __TITLE__
+@@ -69,7 +71,7 @@ namespace dsn {
+             {
+                 derror("load dynamic library '%s' failed, err = %d", module_name.c_str(), ::GetLastError());
+             }            
+-# elif defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__)
++# elif defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__)
+             module_name = "lib" + module_name + ".so";
+             auto hmod = dlopen(module_name.c_str(), RTLD_LAZY|RTLD_GLOBAL);
+             if (nullptr == hmod)
+@@ -86,7 +88,7 @@ namespace dsn {
+         {
+ # if defined(_WIN32)
+             return (dsn_handle_t)::GetProcAddress((HMODULE)hmodule, (LPCSTR)symbol);
+-# elif defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__)
++# elif defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__)
+             return (dsn_handle_t)dlsym((void*)hmodule, symbol);
+ # else
+ # error not implemented yet
+@@ -97,7 +99,7 @@ namespace dsn {
+         {
+ # if defined(_WIN32)
+             ::CloseHandle((HMODULE)hmodule);
+-# elif defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__)
++# elif defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__)
+             dlclose((void*)hmodule);
+ # else
+ # error not implemented yet
+@@ -105,4 +107,3 @@ namespace dsn {
+         }
+     }
+ }
+-
diff --git a/rdsn-git/patches/patch-src_core_core_task__worker.cpp b/rdsn-git/patches/patch-src_core_core_task__worker.cpp
new file mode 100644
index 0000000..c7eedaf
--- /dev/null
+++ b/rdsn-git/patches/patch-src_core_core_task__worker.cpp
@@ -0,0 +1,42 @@
+$NetBSD$
+
+--- src/core/core/task_worker.cpp.orig	2016-02-27 19:59:48.000000000 +0000
++++ src/core/core/task_worker.cpp
+@@ -51,6 +51,10 @@
+ # include <mach/thread_policy.h>
+ # endif
+ 
++# ifdef __NetBSD__
++# include <sched.h>
++# endif
++
+ # endif
+ 
+ 
+@@ -156,6 +160,8 @@ void task_worker::set_name(const char* n
+     err = pthread_setname_np(tid, thread_name.c_str());
+     # elif defined(__APPLE__)
+     err = pthread_setname_np(thread_name.c_str());
++    # elif defined(__NetBSD__)
++    err = pthread_setname_np(tid, "%s", (void*)thread_name.c_str());
+     # endif
+     if (err != 0)
+     {
+@@ -255,10 +261,16 @@ void task_worker::set_affinity(uint64_t 
+         THREAD_AFFINITY_POLICY_COUNT
+         ));
+ # else
+-    # ifdef __FreeBSD__
++    # if defined(__FreeBSD__) || defined(__NetBSD__)
+         # ifndef cpu_set_t
+             # define cpu_set_t cpuset_t
+         # endif
++        # ifndef CPU_ZERO
++            # define CPU_ZERO cpuset_zero
++        # endif
++        # ifndef CPU_SET
++            # define CPU_SET cpuset_set
++        # endif
+     # endif
+     cpu_set_t cpuset;
+     int nr_bits = std::min(nr_cpu, static_cast<int>(sizeof(affinity) * 8));
diff --git a/rdsn-git/patches/patch-src_dev_cpp_file__utils.cpp b/rdsn-git/patches/patch-src_dev_cpp_file__utils.cpp
index 7af515f..a3c73ce 100644
--- a/rdsn-git/patches/patch-src_dev_cpp_file__utils.cpp
+++ b/rdsn-git/patches/patch-src_dev_cpp_file__utils.cpp
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- src/dev/cpp/file_utils.cpp.orig	2016-02-27 19:03:52.000000000 +0000
+--- src/dev/cpp/file_utils.cpp.orig	2016-02-27 19:59:48.000000000 +0000
 +++ src/dev/cpp/file_utils.cpp
 @@ -76,7 +76,11 @@
  
diff --git a/rdsn-git/patches/patch-src_dev_cpp_utils.cpp b/rdsn-git/patches/patch-src_dev_cpp_utils.cpp
index 37fa723..b4df6b9 100644
--- a/rdsn-git/patches/patch-src_dev_cpp_utils.cpp
+++ b/rdsn-git/patches/patch-src_dev_cpp_utils.cpp
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- src/dev/cpp/utils.cpp.orig	2016-02-27 19:03:52.000000000 +0000
+--- src/dev/cpp/utils.cpp.orig	2016-02-27 19:59:48.000000000 +0000
 +++ src/dev/cpp/utils.cpp
 @@ -45,6 +45,8 @@
  # include <sys/thr.h>


Home | Main Index | Thread Index | Old Index