From 35c7e80281ff6079b6e89dd421addd0a5f6b8b2c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 18 Aug 2022 17:14:16 -0400 Subject: Fix thread function attributes on Windows --- include/zix/thread.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'include/zix/thread.h') diff --git a/include/zix/thread.h b/include/zix/thread.h index 29dee44..9c213de 100644 --- a/include/zix/thread.h +++ b/include/zix/thread.h @@ -27,7 +27,7 @@ extern "C" { #ifdef _WIN32 # define ZIX_THREAD_RESULT 0 -# define ZIX_THREAD_FUNC __attribute__((stdcall)) +# define ZIX_THREAD_FUNC __stdcall typedef HANDLE ZixThread; typedef DWORD ZixThreadResult; @@ -51,8 +51,7 @@ typedef void* ZixThreadResult; "Returning" a result, and communicating with the parent thread in general, can be done through the pointer argument. */ -typedef ZIX_THREAD_FUNC -ZixThreadResult (*ZixThreadFunc)(void*); +typedef ZixThreadResult(ZIX_THREAD_FUNC* ZixThreadFunc)(void*); /** Initialize `thread` to a new thread. -- cgit v1.2.1