summaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-04-30 03:46:09 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-04-30 03:46:09 +0200
commitc5443e1b3912cd1b7091db9814cf65a429d951e7 (patch)
treed4ca3b61406dc3e7ea2857208a50297a44546b92 /compat
parentec3d83a73213cc1360ebbd350ec1a1be2018c7af (diff)
compat/thread-name: use SetThreadDescription on mingw-w64
Diffstat (limited to 'compat')
-rw-r--r--compat/thread-name.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/compat/thread-name.cpp b/compat/thread-name.cpp
index da9aacd5..d12a59ca 100644
--- a/compat/thread-name.cpp
+++ b/compat/thread-name.cpp
@@ -8,8 +8,9 @@
namespace portable {
-#if defined _MSC_VER
+#ifdef _WIN32
+#ifdef _MSC_VER
struct THREADNAME_INFO
{
DWORD dwType; // must be 0x1000
@@ -40,6 +41,11 @@ void set_curthread_name_old(const QString& name_)
{
}
}
+#else
+
+static inline void set_curthread_name_old(const QString&) {}
+
+#endif
void set_curthread_name(const QString& name)
{
@@ -58,13 +64,6 @@ void set_curthread_name(const QString& name)
}
}
-#elif defined _WIN32
-
-void set_curthread_name(const QString& name)
-{
- (void)name;
-}
-
#else
void set_curthread_name(const QString& name)