sdl2-compat: SDL_config_unix.h: Assume we have complete POSIX functionality

From 8c7b3f536d2ea71b08b9387999141c2cf15881b7 Mon Sep 17 00:00:00 2001
From: Simon McVittie <[EMAIL REDACTED]>
Date: Wed, 5 Feb 2025 14:14:05 +0000
Subject: [PATCH] SDL_config_unix.h: Assume we have complete POSIX
 functionality

Classic SDL2 checked for these functions at compile-time and defined
the corresponding macros if found. According to the man pages on my
Linux system, these were all specified in POSIX.1-2008 or older, so
they seem like they ought to be a safe assumption.

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 include/SDL2/SDL_config_unix.h | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/include/SDL2/SDL_config_unix.h b/include/SDL2/SDL_config_unix.h
index c239568..2a5d2c7 100644
--- a/include/SDL2/SDL_config_unix.h
+++ b/include/SDL2/SDL_config_unix.h
@@ -139,6 +139,31 @@
 #define HAVE_STRINGS_H 1
 #define HAVE_SYS_TYPES_H 1
 
+/* Assume that any reasonable Unix platform has POSIX functions */
+#define HAVE_CLOCK_GETTIME 1
+#define HAVE_DLOPEN 1
+#define HAVE_FSEEKO 1
+#define HAVE_ICONV 1
+#define HAVE_MPROTECT 1
+#define HAVE_NANOSLEEP 1
+#define HAVE_POLL 1
+#define HAVE_POSIX_FALLOCATE 1
+#define HAVE_PUTENV 1
+#define HAVE_SEM_TIMEDWAIT 1
+#define HAVE_SETENV 1
+#define HAVE_SIGACTION 1
+#define HAVE_STRCASECMP 1
+#define HAVE_STRNCASECMP 1
+#define HAVE_STRTOK_R 1
+#define HAVE_SYSCONF 1
+#define HAVE_UNSETENV 1
+#define HAVE_WCSCASECMP 1
+#define HAVE_WCSDUP 1
+#define HAVE__EXIT 1
+
+/* Specified by POSIX */
+#define HAVE_O_CLOEXEC 1
+
 /* Non-standardized, but we assume they exist anyway */
 #define HAVE_ALLOCA_H 1
 #define HAVE_MALLOC_H 1