sdl12-compat: Make include logic closer to real SDL 1.2

From 70106dd3c2f8b3ebf3fe428a7001185b7dca42f3 Mon Sep 17 00:00:00 2001
From: Joshua Root <[EMAIL REDACTED]>
Date: Mon, 29 Aug 2022 10:20:37 +1000
Subject: [PATCH] Make include logic closer to real SDL 1.2

This should offer better compatibility in some cases.
---
 include/SDL/SDL_stdinc.h | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/include/SDL/SDL_stdinc.h b/include/SDL/SDL_stdinc.h
index aa070c4cb..d604b0392 100644
--- a/include/SDL/SDL_stdinc.h
+++ b/include/SDL/SDL_stdinc.h
@@ -83,10 +83,9 @@ SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
 #ifdef HAVE_STDIO_H
 #include <stdio.h>
 #endif
-#ifdef HAVE_STDLIB_H
+#if defined(HAVE_STDLIB_H)
 #include <stdlib.h>
-#endif
-#ifdef HAVE_MALLOC_H
+#elif defined(HAVE_MALLOC_H)
 #include <malloc.h>
 #endif
 #ifdef HAVE_STDDEF_H
@@ -101,10 +100,9 @@ SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
 #ifdef HAVE_STRINGS_H
 #include <strings.h>
 #endif
-#ifdef HAVE_INTTYPES_H
+#if defined(HAVE_INTTYPES_H)
 #include <inttypes.h>
-#endif
-#ifdef HAVE_STDINT_H
+#elif defined(HAVE_STDINT_H)
 #include <stdint.h>
 #endif
 #ifdef HAVE_CTYPE_H