Fixed bug 3744 - missing SDLCALL in several functions Ozkan Sezer The attached patch adds missing SDLCALL to several functions, so that they properly match the headers as intended.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206
diff --git a/src/SDL_assert.c b/src/SDL_assert.c
index c64d626..47309eb 100644
--- a/src/SDL_assert.c
+++ b/src/SDL_assert.c
@@ -49,7 +49,7 @@
#endif
-static SDL_assert_state
+static SDL_assert_state SDLCALL
SDL_PromptAssertion(const SDL_assert_data *data, void *userdata);
/*
@@ -141,7 +141,7 @@ static SDL_NORETURN void SDL_AbortAssertion(void)
}
-static SDL_assert_state
+static SDL_assert_state SDLCALL
SDL_PromptAssertion(const SDL_assert_data *data, void *userdata)
{
#ifdef __WIN32__
diff --git a/src/events/SDL_windowevents.c b/src/events/SDL_windowevents.c
index 12d4b83..b12dfbf 100644
--- a/src/events/SDL_windowevents.c
+++ b/src/events/SDL_windowevents.c
@@ -28,7 +28,7 @@
#include "../video/SDL_sysvideo.h"
-static int
+static int SDLCALL
RemovePendingResizedEvents(void * userdata, SDL_Event *event)
{
SDL_Event *new_event = (SDL_Event *)userdata;
@@ -42,7 +42,7 @@ RemovePendingResizedEvents(void * userdata, SDL_Event *event)
return 1;
}
-static int
+static int SDLCALL
RemovePendingSizeChangedEvents(void * userdata, SDL_Event *event)
{
SDL_Event *new_event = (SDL_Event *)userdata;
@@ -56,7 +56,7 @@ RemovePendingSizeChangedEvents(void * userdata, SDL_Event *event)
return 1;
}
-static int
+static int SDLCALL
RemovePendingMoveEvents(void * userdata, SDL_Event *event)
{
SDL_Event *new_event = (SDL_Event *)userdata;
@@ -70,7 +70,7 @@ RemovePendingMoveEvents(void * userdata, SDL_Event *event)
return 1;
}
-static int
+static int SDLCALL
RemovePendingExposedEvents(void * userdata, SDL_Event *event)
{
SDL_Event *new_event = (SDL_Event *)userdata;
diff --git a/src/joystick/SDL_gamecontroller.c b/src/joystick/SDL_gamecontroller.c
index ba0ab83..1227fa7 100644
--- a/src/joystick/SDL_gamecontroller.c
+++ b/src/joystick/SDL_gamecontroller.c
@@ -333,7 +333,7 @@ static void HandleJoystickHat(SDL_GameController *gamecontroller, int hat, Uint8
/*
* Event filter to fire controller events from joystick ones
*/
-static int SDL_GameControllerEventWatcher(void *userdata, SDL_Event * event)
+static int SDLCALL SDL_GameControllerEventWatcher(void *userdata, SDL_Event * event)
{
switch(event->type) {
case SDL_JOYAXISMOTION:
diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index ea8cfdf..81feaf6 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -102,7 +102,7 @@ SDL_GetRenderDriverInfo(int index, SDL_RendererInfo * info)
#endif
}
-static int
+static int SDLCALL
SDL_RendererEventWatch(void *userdata, SDL_Event *event)
{
SDL_Renderer *renderer = (SDL_Renderer *)userdata;
diff --git a/src/timer/SDL_timer.c b/src/timer/SDL_timer.c
index 3dcf7cb..2ed9ae1 100644
--- a/src/timer/SDL_timer.c
+++ b/src/timer/SDL_timer.c
@@ -97,7 +97,7 @@ SDL_AddTimerInternal(SDL_TimerData *data, SDL_Timer *timer)
timer->next = curr;
}
-static int
+static int SDLCALL
SDL_TimerThread(void *_data)
{
SDL_TimerData *data = (SDL_TimerData *)_data;
diff --git a/test/testatomic.c b/test/testatomic.c
index 52646d6..bbb0270 100644
--- a/test/testatomic.c
+++ b/test/testatomic.c
@@ -117,7 +117,7 @@ static SDL_atomic_t threadsRunning;
static SDL_sem *threadDone;
static
-int adder(void* junk)
+int SDLCALL adder(void* junk)
{
unsigned long N=NInter;
SDL_Log("Thread subtracting %d %lu times\n",CountInc,N);
@@ -495,7 +495,7 @@ typedef struct
char padding[SDL_CACHELINE_SIZE-(sizeof(SDL_EventQueue*)+sizeof(int)*NUM_WRITERS+sizeof(int)+sizeof(SDL_bool))%SDL_CACHELINE_SIZE];
} ReaderData;
-static int FIFO_Writer(void* _data)
+static int SDLCALL FIFO_Writer(void* _data)
{
WriterData *data = (WriterData *)_data;
SDL_EventQueue *queue = data->queue;
@@ -530,7 +530,7 @@ static int FIFO_Writer(void* _data)
return 0;
}
-static int FIFO_Reader(void* _data)
+static int SDLCALL FIFO_Reader(void* _data)
{
ReaderData *data = (ReaderData *)_data;
SDL_EventQueue *queue = data->queue;
@@ -570,7 +570,7 @@ static int FIFO_Reader(void* _data)
#ifdef TEST_SPINLOCK_FIFO
/* This thread periodically locks the queue for no particular reason */
-static int FIFO_Watcher(void* _data)
+static int SDLCALL FIFO_Watcher(void* _data)
{
SDL_EventQueue *queue = (SDL_EventQueue *)_data;
diff --git a/test/testautomation_audio.c b/test/testautomation_audio.c
index bef838d..be0f15e 100644
--- a/test/testautomation_audio.c
+++ b/test/testautomation_audio.c
@@ -46,7 +46,7 @@ int _audio_testCallbackLength;
/* Test callback function */
-void _audio_testCallback(void *userdata, Uint8 *stream, int len)
+void SDLCALL _audio_testCallback(void *userdata, Uint8 *stream, int len)
{
/* track that callback was called */
_audio_testCallbackCounter++;
diff --git a/test/testautomation_events.c b/test/testautomation_events.c
index a0119bd..09004da 100644
--- a/test/testautomation_events.c
+++ b/test/testautomation_events.c
@@ -25,7 +25,7 @@ int _userdataValue1 = 1;
int _userdataValue2 = 2;
/* Event filter that sets some flags and optionally checks userdata */
-int _events_sampleNullEventFilter(void *userdata, SDL_Event *event)
+int SDLCALL _events_sampleNullEventFilter(void *userdata, SDL_Event *event)
{
_eventFilterCalled = 1;
diff --git a/test/testautomation_timer.c b/test/testautomation_timer.c
index 6d73856..a42eb37 100644
--- a/test/testautomation_timer.c
+++ b/test/testautomation_timer.c
@@ -104,7 +104,7 @@ timer_delayAndGetTicks(void *arg)
}
/* Test callback */
-Uint32 _timerTestCallback(Uint32 interval, void *param)
+Uint32 SDLCALL _timerTestCallback(Uint32 interval, void *param)
{
_timerCallbackCalled = 1;
diff --git a/test/testhittesting.c b/test/testhittesting.c
index 5e32be4..c5223a9 100644
--- a/test/testhittesting.c
+++ b/test/testhittesting.c
@@ -14,7 +14,7 @@ const SDL_Rect drag_areas[] = {
static const SDL_Rect *areas = drag_areas;
static int numareas = SDL_arraysize(drag_areas);
-static SDL_HitTestResult
+static SDL_HitTestResult SDLCALL
hitTest(SDL_Window *window, const SDL_Point *pt, void *data)
{
int i;
diff --git a/test/testmessage.c b/test/testmessage.c
index 0a4b93f..27407ba 100644
--- a/test/testmessage.c
+++ b/test/testmessage.c
@@ -25,7 +25,7 @@ quit(int rc)
exit(rc);
}
-static int
+static int SDLCALL
button_messagebox(void *eventNumber)
{
const SDL_MessageBoxButtonData buttons[] = {