@@ -11,14 +11,18 @@ * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ + +#include "config.h" #ifdef HAVE_PTHREAD_NP_H # include #endif + +#import "macros.h" struct thread_ctx { void (*function)(id object); id object; }; @@ -161,16 +165,16 @@ } void of_thread_set_name(of_thread_t thread, const char *name) { -#if defined(__HAIKU__) +#if defined(OF_HAIKU) rename_thread(get_pthread_thread_id(thread), name); #elif defined(HAVE_PTHREAD_SET_NAME_NP) pthread_set_name_np(pthread_self(), name); #elif defined(HAVE_PTHREAD_SETNAME_NP) -# if defined(__APPLE__) +# if defined(OF_MAC_OS_X) || defined(OF_IOS) pthread_setname_np(name); # elif defined(__GLIBC__) char buffer[16]; strncpy(buffer, name, 15);