mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-11-11 21:08:40 +00:00
Use #ifdef/#ifndef instead of #if defined/#if \!defined
This commit is contained in:
committed by
Anonymous Maarten
parent
308bcbbe76
commit
b6ae281e97
@@ -48,7 +48,7 @@ SDL_CreateMutex(void)
|
||||
mutex = (SDL_mutex *)SDL_calloc(1, sizeof(*mutex));
|
||||
if (mutex) {
|
||||
pthread_mutexattr_init(&attr);
|
||||
#if defined(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX)
|
||||
#ifdef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX
|
||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
||||
#elif defined(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP)
|
||||
pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
|
||||
|
||||
@@ -133,7 +133,7 @@ void SDL_SYS_SetupThread(const char *name)
|
||||
#endif
|
||||
}
|
||||
#elif defined(HAVE_PTHREAD_SETNAME_NP)
|
||||
#if defined(__NETBSD__)
|
||||
#ifdef __NETBSD__
|
||||
pthread_setname_np(pthread_self(), "%s", name);
|
||||
#else
|
||||
if (pthread_setname_np(pthread_self(), name) == ERANGE) {
|
||||
@@ -176,7 +176,7 @@ SDL_ThreadID(void)
|
||||
|
||||
int SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority)
|
||||
{
|
||||
#if defined(__RISCOS__)
|
||||
#ifdef __RISCOS__
|
||||
/* FIXME: Setting thread priority does not seem to be supported */
|
||||
return 0;
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user