From 8e5ad25c3cb104e4ba0eaa0cc52ed9a67db36da7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Wed, 21 Aug 2019 19:04:28 +0200 Subject: [PATCH] Disable Windows Thread Name by default (Fix #7) --- lib/src/thread.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/thread.c b/lib/src/thread.c index 1dea3b2..27efd2f 100644 --- a/lib/src/thread.c +++ b/lib/src/thread.c @@ -66,9 +66,11 @@ CHIAKI_EXPORT ChiakiErrorCode chiaki_thread_join(ChiakiThread *thread, void **re return CHIAKI_ERR_SUCCESS; } +//#define CHIAKI_WINDOWS_THREAD_NAME + CHIAKI_EXPORT ChiakiErrorCode chiaki_thread_set_name(ChiakiThread *thread, const char *name) { -#ifdef _WIN32 +#if defined(_WIN32) && defined(CHIAKI_WINDOWS_THREAD_NAME) int len = MultiByteToWideChar(CP_UTF8, 0, name, -1, NULL, 0); wchar_t *wstr = calloc(sizeof(wchar_t), len+1); if(!wstr)