summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/thread
diff options
context:
space:
mode:
authorPaul Cercueil <paul.cercueil@analog.com>2015-09-14 14:53:35 +0200
committerJohnathan Corgan <johnathan@corganlabs.com>2016-05-30 13:23:22 -0700
commit25142dad0464bed59dc03672931aab637f82d376 (patch)
tree1ec31795dbb5a1d98aa941e17c38b30c58964e02 /gnuradio-runtime/lib/thread
parentae26f969c9c260556aad4ffd006fea96f3452d01 (diff)
cmake: Windows-specific fixes for compatibility
* Properly wrap the prefix variables in quotation marks. This allows to set an empty prefix. * Fix library names when compiling for Windows. This now also works when using mingw-w64. * Fix boost module name when compiling with mingw-w64 * Fix build under mingw-w64 * Fix config.h header to avoid macro redefinition * Remove duplicated Boost::thread entry in dependencies list
Diffstat (limited to 'gnuradio-runtime/lib/thread')
-rw-r--r--gnuradio-runtime/lib/thread/thread.cc10
-rw-r--r--gnuradio-runtime/lib/thread/thread_body_wrapper.cc2
2 files changed, 10 insertions, 2 deletions
diff --git a/gnuradio-runtime/lib/thread/thread.cc b/gnuradio-runtime/lib/thread/thread.cc
index 483dfed493..f2606c71ae 100644
--- a/gnuradio-runtime/lib/thread/thread.cc
+++ b/gnuradio-runtime/lib/thread/thread.cc
@@ -28,7 +28,7 @@
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
-#include <Windows.h>
+#include <windows.h>
namespace gr {
namespace thread {
@@ -111,6 +111,7 @@ namespace gr {
// Not implemented on Windows
return -1;
}
+#ifndef __MINGW32__
#pragma pack(push,8)
typedef struct tagTHREADNAME_INFO
{
@@ -152,6 +153,13 @@ namespace gr {
_set_thread_name(thread, name.c_str(), dwThreadId);
}
+#else
+ void
+ set_thread_name(gr_thread_t thread, std::string name)
+ {
+ /* Not implemented on mingw-w64 */
+ }
+#endif /* !__MINGW32__ */
} /* namespace thread */
} /* namespace gr */
diff --git a/gnuradio-runtime/lib/thread/thread_body_wrapper.cc b/gnuradio-runtime/lib/thread/thread_body_wrapper.cc
index e23b7d15d0..fffa7e4c44 100644
--- a/gnuradio-runtime/lib/thread/thread_body_wrapper.cc
+++ b/gnuradio-runtime/lib/thread/thread_body_wrapper.cc
@@ -34,7 +34,7 @@
namespace gr {
namespace thread {
-#if defined(HAVE_PTHREAD_SIGMASK) && defined(HAVE_SIGNAL_H)
+#if defined(HAVE_PTHREAD_SIGMASK) && defined(HAVE_SIGNAL_H) && !defined(__MINGW32__)
void mask_signals()
{