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

@@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if defined(SDL_TIMER_NGAGE)
#ifdef SDL_TIMER_NGAGE
#include <e32std.h>
#include <e32hal.h>

View File

@@ -69,7 +69,7 @@ static SDL_bool has_monotonic_time = SDL_FALSE;
static void CheckMonotonicTime(void)
{
#if defined(HAVE_CLOCK_GETTIME)
#ifdef HAVE_CLOCK_GETTIME
struct timespec value;
if (clock_gettime(SDL_MONOTONIC_CLOCK, &value) == 0) {
has_monotonic_time = SDL_TRUE;
@@ -92,7 +92,7 @@ SDL_GetPerformanceCounter(void)
}
if (has_monotonic_time) {
#if defined(HAVE_CLOCK_GETTIME)
#ifdef HAVE_CLOCK_GETTIME
struct timespec now;
clock_gettime(SDL_MONOTONIC_CLOCK, &now);
@@ -124,7 +124,7 @@ SDL_GetPerformanceFrequency(void)
}
if (has_monotonic_time) {
#if defined(HAVE_CLOCK_GETTIME)
#ifdef HAVE_CLOCK_GETTIME
return SDL_NS_PER_SECOND;
#elif defined(__APPLE__)
Uint64 freq = mach_base_info.denom;
@@ -141,7 +141,7 @@ void SDL_DelayNS(Uint64 ns)
{
int was_error;
#if defined(HAVE_NANOSLEEP)
#ifdef HAVE_NANOSLEEP
struct timespec tv, remaining;
#else
struct timeval tv;
@@ -157,7 +157,7 @@ void SDL_DelayNS(Uint64 ns)
#endif
/* Set the timeout interval */
#if defined(HAVE_NANOSLEEP)
#ifdef HAVE_NANOSLEEP
remaining.tv_sec = (time_t)(ns / SDL_NS_PER_SECOND);
remaining.tv_nsec = (long)(ns % SDL_NS_PER_SECOND);
#else
@@ -166,7 +166,7 @@ void SDL_DelayNS(Uint64 ns)
do {
errno = 0;
#if defined(HAVE_NANOSLEEP)
#ifdef HAVE_NANOSLEEP
tv.tv_sec = remaining.tv_sec;
tv.tv_nsec = remaining.tv_nsec;
was_error = nanosleep(&tv, &remaining);