From 913c891006ccf466280129508aac455466e09c1b Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Fri, 19 Feb 2021 17:47:00 +0300
Subject: [PATCH] constructor and destructor attributes are for gcc only.
---
src/SDL12_compat.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c
index 91a9ec4..d42a9a3 100644
--- a/src/SDL12_compat.c
+++ b/src/SDL12_compat.c
@@ -836,6 +836,7 @@ LoadSDL20(void)
return okay;
}
+#if defined(__GNUC__)
static void dllinit(void) __attribute__((constructor));
static void dllinit(void)
{
@@ -851,6 +852,13 @@ static void dllquit(void)
{
UnloadSDL20();
}
+#elif defined(_MSC_VER) && defined(_WIN32)
+ #error Write me
+#elif defined(__WATCOMC__) && defined(__OS2__)
+ #error Write me
+#else
+ #error Please define your platform.
+#endif
DECLSPEC const SDL_version * SDLCALL
SDL_Linked_Version(void)