Use #ifdef/#ifndef instead of #if defined/#if \!defined

This commit is contained in:
Anonymous Maarten
2023-03-30 20:26:31 +02:00
committed by Anonymous Maarten
parent 308bcbbe76
commit b6ae281e97
129 changed files with 450 additions and 450 deletions

View File

@@ -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);

View File

@@ -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